Skip to content

pintocarlos/react-jqueryui-accordion

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

react-jqueryui-accordion

React jQuery-UI Accordion

Install

$ npm install --save react-jqueryui-accordion

from https://npmjs.com/package/react-jqueryui-accordion

Usage

<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;

About

A simple react component for jquery-ui's accordion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%