react-smooth-toggle
v1.0.0
Published
A smooth toggle component for React with animation.
Maintainers
Readme
react-smooth-toggle
A lightweight React component for toggling visibility with smooth animation.
Installation
npm install react-smooth-toggleUsage
import { SmoothToggle } from 'react-smooth-toggle';
<SmoothToggle isOpen={true} duration={300}>
<div>This content appears with a smooth toggle!</div>
</SmoothToggle>Props
| Prop | Type | Default | Description | |----------|----------|---------|-----------------------------------| | isOpen | boolean | — | Whether the content is visible | | duration | number | 300 | Animation duration in milliseconds |
License
MIT
