deku-accordion [](https://travis-ci.org/gillstrom/deku-accordion)
July 4, 2017 · View on GitHub
Accordion component for deku
Install
$ npm install deku-accordion
Usage
import Accordion from 'deku-accordion';
export const render = () => {
const items = [{
content: <div>Content 1</div>,
heading: 'Heading 1'
}, {
content: <div>Content 2</div>,
heading: 'Heading 2',
active: true
}, {
content: <div>Content 3</div>,
heading: 'Heading 3',
active: true
}];
return (
<Accordion items={items} multiple/>
);
}
Props
classadds classes to the componentitemsis the array of accordion elementsmultiplelets you have several items open at onceonClickreturns currently active indexes and clicked item
License
MIT © Andreas Gillström