react-sliding-panel
Simple React component for sliding panel on mobile.
Install
npm install react-sliding-panel --save
Example
import SlidingPanel from 'react-sliding-panel';
const [isOpen, setIsOpen] = useState(false);
<SlidingPanel
type="side"
isOpen={isOpen}
closeFunc={() => setIsOpen(false)}
>
<YourComponent />
</SlidingPanel>
Documentation - props
Always required
type: string
Set sliding panel type.
isOpen: boolean
Save sliding panel state
closeFunc: function
Set sliding panel close function
Changelog
License
MIT License