angular-accordion

Accordion module for AngularJS

Added by: Sam Deering

GitHub

Repository

tomaszczechowski/angular-accordion

Stats

Stars: 1

Watchers: 1

Forks: 0

Module Description

Angular accordion

Light and simply UI accordion module for Angular

Compatibility

  • IE Browsers: IE8+, Others
  • Angular: 1.2.28+

Setup

  • place it into scripts directory of your application
  • in accordion directives set parameter "templateUrl" relative to module path

Options

  • id (required): Set id of accordion element. It is required parameter to recognise accordion in his model.
<accordion id="1">
    ...
</accordion>
  • one-open (default: true): Open more then one collapsible element at a time.
<accordion one-open="false">
    ...
</accordion>
  • open-class (default: open): CSS classes added to opened collapsible elements.
<accordion open-class="accordion-open-class">
    ...
</accordion>
  • close-class (default: close): CSS classes added to closed collapsible elements.
<accordion close-class="accordion-closed-class">
    ...
</accordion>
  • init-open (default: false): Open collapsible element after initially rendering on page.
<accordion>
    <accordion-item init-open="true">...</accordion-item>
</accordion>
  • header: Header of collapsible element.
<accordion>
    <accordion-item header="Element 1" init-open="true">...</accordion-item>
    <accordion-item header="Element 2">...</accordion-item>
</accordion>

Example

<accordion open-class="accordion-item-open" close-class="accordion-item-close" one-open="true">
  <accordion-item header="Header 1" init-open="true">...</accordion-item>
  <accordion-item header="Header 2">...</accordion-item>
  <accordion-item header="Header 3">...</accordion-item>
</accordion>

Release notes

  • 0.2.0 Added possibility of initialization more than one accordion
  • 0.1.0 Accordion first acting version
Licence MIT
Author: Tomasz Czechowski
  • Twitter: https://twitter.com/t_czechowski

Module stats last updated: 2015-04-19 15:03:07

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!