This content originally appeared on DEV Community and was authored by Alain Di Fabio
This component is inspired by how Arc makes you choose its app icon. đź–Ą Watch the demo video to see the component live in action!
⚡️ TECHNOLOGIES
- React
- Tailwind CSS
- Typescript ⚙️ HOW IT WORKS
const items = [
{
src: '/images/arc-icon/1.png',
},
{
src: '/images/arc-icon/2.png',
},
...
]
<ADFSchelfSelector
className="w-full max-w-lg"
selected={selectedIndex}
onSelect={(index) => setSelectedIndex(index)}
items={items}
/>
Change color indicator or sides fade color with:
<ADFSchelfSelector
...
classNameSides?: string;
classNameIndicator?: string;
/>
Replace this following default classes:
> classNameSides = "via-white to-white",
> classNameIndicator = "bg-blue-500 shadow-blue-500",
Follow me on X: adfdev
This content originally appeared on DEV Community and was authored by Alain Di Fabio
Alain Di Fabio | Sciencx (2024-06-24T10:59:34+00:00) Shelf selector (Inspired Arc icon selector). Retrieved from https://www.scien.cx/2024/06/24/shelf-selector-inspired-arc-icon-selector/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.