1.0.7 • Published 1 year ago
slush-bucket v1.0.7
Slush-Bucket
Installation and usage
The easiest way to use slush-bucket is to install it from npm.
npm i slush-bucket
Then use it in your app:
With React Hooks
import { useState } from 'react';
import SlushBucket from 'slush-bucket';
const data = [
{ title: 'chocolate', label: 'Chocolate' },
{ title: 'strawberry', label: 'Strawberry' },
{ title: 'vanilla', label: 'Vanilla' },
];
function App() {
const [selectedData,setSelectedData] = useState([]);
return (
<SlushBucket
options={data}
value={selectedData}
onClick={setSelectedData}
/>
);
}
export default App;
Props
Common props you may want to specify include:
options
- specify the options the user can select fromonClick
- subscribe to click eventsvalue
- control the current value
Thanks
Thank you to everyone who has contributed to this project. It's been a wild ride.
License
MIT Licensed. Copyright (c) Jasdeep Singh 2023.