Dropdown
Clickable button that renders a popup containing a list of available actions.
Import
Usage
Variants
Dangerous items
Icons
Orientation
Alignment
Props
Dropdown
| Prop | Type | Default | Description |
|---|
orientation | "top" | "bottom" | "bottom" | Position of actions list relative to the toggle button |
alignment | "left" | "right" | "left" | Alignment of actions list relative to the toggle button |
children* | ReactNode | - | Expecting <Dropdown.Header> followed by <Dropdown.List> |
| Prop | Type | Default | Description |
|---|
children* | string | JSX.Element | - | Inner text of the button or a custom component inside the button |
borderRadius | string | "0.5rem" | Border radius of the toggle button |
Dropdown.List
| Prop | Type | Default | Description |
|---|
children* | ReactNode | - | Expecting a list of <Dropdown.Item> |
Dropdown.Item
| Prop | Type | Default | Description |
|---|
onClick | () => void | - | Callback function of the respective action |
isDangerous | boolean | false | Hints if an action is dangerous |
children* | string | JSX.Element | - | Inner text of the action button |
*: mandatory props