GithubHelp home page GithubHelp logo

ic-tabs's Introduction

ic-tabs

Build Status

WAI-ARIA accessible tab component for Ember.js.

Demo

http://instructure.github.io/ic-tabs

Installation

$ npm install ic-tabs

or ...

$ bower install ic-tabs

or just grab your preferred distribution from dist/.

Then include the script(s) into your application:

npm+browserify

require('ic-tabs')

amd

Register ic-tabs as a package, then:

define(['ic-tabs'], ...)

named-amd

You ought to know what you're doing if this is the case.

globals

<script src="bower_components/ic-styled/main.js"></script> <script src="bower_components/ic-tabs/dist/globals/main.js"></script>

Usage

{{#ic-tabs}}
  {{#ic-tab-list}}
    {{#ic-tab}}Foo{{/ic-tab}}
    {{#ic-tab}}Bar{{/ic-tab}}
    {{#ic-tab}}Baz{{/ic-tab}}
  {{/ic-tab-list}}

  {{#ic-tab-panel}}
    <h2>Foo</h2>
  {{/ic-tab-panel}}

  {{#ic-tab-panel}}
    <h2>Bar</h2>
  {{/ic-tab-panel}}

  {{#ic-tab-panel}}
    <h2>Baz</h2>
  {{/ic-tab-panel}}
{{/ic-tabs}}
  • associations between tabs and tab-panes are inferred by order.
  • ic-tab-list must be an immediate child of ic-tabs
  • ic-tab must be an immediate child of ic-tab-list
  • ic-tab-panel must be an immediate child of ic-tabs

Options

  • {{ic-tabs selected-index=prop}} - binds the active-index to prop, mostly useful for queryParams.

Contributing

$ git clone <this repo>
$ npm install
$ npm test
# during dev
$ broccoli serve
# edit examples/ files and karma.conf to point to
# localhost:4200/globals/main.js instead of dist/globals/main.js
# new tab
$ karma start

Make a new branch, send a pull request, squashing commits into one change is preferred.

ic-tabs's People

Contributors

ef4 avatar fsmanuel avatar ryanflorence avatar

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.