React jQuery-UI Accordion
$ npm install --save react-jqueryui-accordion
from https://npmjs.com/package/react-jqueryui-accordion
<Accordion>
<h1>Title 1</h1>
<div>Content</div>
<h1>Title 2</h1>
<div>Content</div>
</Accordion>
Pass options (docs):
<Accordion options={{height: 'fill'}}>
<h1>Title 1</h1>
<div>Content</div>
<h1>Title 2</h1>
<div>Content</div>
</Accordion>
Select panel and interact with active
:
<Accordion ref="accordion">
...
</Accordion>
// get current active panel index
var index = this.refs.accordion.active;
// activate 3rd panel
this.refs.accordion.active = 2;
Get currently active header element:
var headerElement = this.refs.accordion.activeHeader;