expandible

Expandible / Collapsible React container

Usage no npm install needed!

<script type="module">
  import expandible from 'https://cdn.skypack.dev/expandible';
</script>

README

Expandible

Making Expandibles / Collapsible / Accordian core easy ❤️

Build Status NPM version

Built with / for TypeScript / React. Expand and collapse certain DOM with silky smooth transitions.

Powered by your github ⭐s

Usage

npm install expandible --save-dev

Use with react:

import {Expandible} from "expandible";

// Later

{/** Toggle */}
<button onClick={() => this.setState({ open: !this.state.open })}>Toggle</button>

{/** Expandible */}
<Expandible open={this.state.open}>
  <div>
    Hello world!
  </div>
</Expandible>

Demo

The above code is exactly how this works: