Fluid Dropdown Component
A modern and animated dropdown component with fluid transitions, built with Framer Motion.
- Smooth opening and closing animations
- Beautifully animated hover state
- Support for icons in dropdown items
- Clean and intuitive design
Installation
The FluidDropdown component is part of our UI library. You can import it directly from the components directory.
Usage
Here is how to use the fluid dropdown in your project:
React TSX
React TSX
Examples
Basic Fluid Dropdown
Custom Colors Dropdown
API Reference
Category Object
Each category is defined by a Category object with the following properties:
Property | Type | Description |
---|---|---|
id | string | Unique identifier for the category |
label | string | Label text displayed on the dropdown item |
icon | React.ElementType | Lucide icon to display next to the label |
color | string | Color for the icon when hovered |
FluidDropdown Props
Prop | Type | Default | Description |
---|---|---|---|
categories | Category[] | Built-in array | Array of category objects |
defaultCategoryId | string | First category's ID | ID of the category to show by default |
className | string | '' | Additional CSS classes |