Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/instructure/ic-tabs
https://github.com/instructure/ic-tabs
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/instructure/ic-tabs
- Owner: instructure
- License: mit
- Created: 2014-03-03T22:24:06.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-03-29T20:50:59.000Z (over 10 years ago)
- Last Synced: 2024-10-11T02:07:25.987Z (about 1 month ago)
- Language: JavaScript
- Size: 1.96 MB
- Stars: 64
- Watchers: 7
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
ic-tabs
=======[![Build Status](https://travis-ci.org/instructure/ic-tabs.png?branch=master)](https://travis-ci.org/instructure/ic-tabs)
[WAI-ARIA][wai-aria] accessible tab component for [Ember.js][ember].
Demo
----http://instructure.github.io/ic-tabs
Installation
------------```sh
$ npm install ic-tabs
```or ...
```sh
$ 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][rjspackage], then:
`define(['ic-tabs'], ...)`
### named-amd
You ought to know what you're doing if this is the case.
### globals
``
``Usage
-----```handlebars
{{#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}}
Foo
{{/ic-tab-panel}}{{#ic-tab-panel}}
Bar
{{/ic-tab-panel}}{{#ic-tab-panel}}
Baz
{{/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
------------```sh
$ git clone
$ 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.[rjspackage]:http://requirejs.org/docs/api.html#packages
[ember]:http://emberjs.com
[wai-aria]:http://www.w3.org/TR/wai-aria/roles#tab