Action Drawer
Action Drawer Component
Installation
Install the following dependencies:
Install the necessary dependencies using your preferred package manager:
Setup the actionDrawerStore
Create a new file called useActionDrawerStore.ts in your store directory:
store/useActionDrawerStore.ts
Adding shadcn/ui components
Once shadcn/ui is installed, you can add its components to your project using the following command:
Usage
Sub Components
ActionDrawerActionDrawerTriggerActionDrawerOverlayActionDrawerContentActionDrawerHeaderActionDrawerFooterActionDrawerClose
Props
Action Drawer Props
| Name | Type | Default | Description |
|---|---|---|---|
className | string | "" | Additional classes for the action drawer |
overlay | boolean | true | Show overlay for backdrop |
from | "left" "right" "bottom" "top" | "left" | Direction from which the drawer should open |
Action Drawer Trigger Props
| Name | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | null | Content of the action drawer trigger |
className | string | "" | Additional classes for the action drawer |
variant | ButtonProps["variant"] | "default" | Variant of the action drawer trigger |
size | ButtonProps["size"] | "default" | Size of the action drawer trigger |
content | React.ReactNode | null | Content of the action drawer |
Action Drawer Content Props
| Name | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | null | Content of the action drawer |
className | string | "" | Additional classes for the action drawer |
Action Drawer Header Props
| Name | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | null | Content of the action drawer header |
className | string | "" | Additional classes for the action drawer |
Action Drawer Footer Props
| Name | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | null | Content of the action drawer footer |
className | string | "" | Additional classes for the action drawer |
Action Drawer Close Props
| Name | Type | Default | Description |
|---|---|---|---|
className | string | "" | Additional classes for the action drawer |
variant | ButtonProps["variant"] | "outline" | Variant of the action drawer close |
size | ButtonProps["size"] | "icon" | Size of the action drawer close |