Giter Club home page Giter Club logo

df-tab-menu's Introduction

df-tab-menu

Responsive tabs with dropdown menu

Purpose

Provide a reponsive tab menu that gracefully overflows into a dropdown.

Demo: http://digitalfondue.ch/df-tab-menu/

Usage

Install

  • $ bower install df-tab-menu

Once installed, add df-tab-menu as a dependency in your module:

  • angular.module('myModule', ['digitalfondue.dftabmenu']);

Requirements

  • AngularJS v1.2.0+ is supported

Integration

Example

<ol df-tab-menu menu-control="{{navigationState}}">
	<li data-menu-item="state1"><a data-ng-href="#"><span>Item 1</span></a></li>
	<li data-menu-item="state2"><a data-ng-href="#"><span>Item 2</span></a></li>
	<li data-more-menu-item><a data-ng-href="#">More +</a></li>
</ol>
  • only ol and ul are valid root elements
  • menu-control is used to control which tab item is the current one. It can be anything available in your scope. Example: using ui-router state name $scope.navigationState = $state.current.name;
  • each data-menu-item refers to a possible state provided by menu-control. If a state is invalid, an exception is throw, and the directive will fail to render correctly
  • data-more-menu-item is used to generate the dropdown entry when that contains the menu items overflow.
  • bootstrap tab classes can be added via the attribute theme="bootstrap" on the root element
  • If you would like to add bootstrap classes to only the dropdown menu you can use theme-drop-down-menu="bootstrap"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.