export const title = "Drawer components"
export const description = "Powerful and customizable React drawer components built for modern applications and websites. These drawers are built using React Aria and styled with Tailwind CSS."
export const links = {
github: "https://github.com/untitleduico/react/tree/main/components/application/slideout-menus/slideout-menu.tsx",
rac: "https://react-spectrum.adobe.com/react-aria/Modal.html"
}
## Installation
You can add this drawer component using our CLI or manually:
```bash
npx untitledui@latest add slideout-menu
```
Copy the files below into your project:
Great! Now you can start using the drawer components in your project by just copy/pasting our examples below.
## Drawers examples
Below are examples and variations of this drawers component:
### Placeholder menu {{ tocOnly:true }}
### User profile menu {{ tocOnly:true }}
### Messages menu {{ tocOnly:true }}
### Message chat menu {{ tocOnly:true }}
### Payment method menu {{ tocOnly:true }}
### Payment details menu {{ tocOnly:true }}
### Plan menu {{ tocOnly:true }}
### Team members menu {{ tocOnly:true }}
### Filters menu {{ tocOnly:true }}
### Filters advanced empty state menu {{ tocOnly:true }}
### Filters advanced active menu {{ tocOnly:true }}
### File upload menu {{ tocOnly:true }}
### Labels menu {{ tocOnly:true }}
### Project details menu {{ tocOnly:true }}
### Notification settings checkbox menu {{ tocOnly:true }}
### Notification settings button menu {{ tocOnly:true }}
### Notifications menu {{ tocOnly:true }}
### Order summary menu {{ tocOnly:true }}
### Calendar event menu {{ tocOnly:true }}
### User settings menu {{ tocOnly:true }}
### AI assistant menu {{ tocOnly:true }}
### AI assistant message menu {{ tocOnly:true }}
### Share project menu {{ tocOnly:true }}
### Create event menu {{ tocOnly:true }}
### Integration menu {{ tocOnly:true }}
## API reference
setIsOpen(false)}` or the `close` function from the drawer's render-function children. Everything you pass as children renders beneath it, so a featured icon, title and supporting text all sit in the header.",
},
{
question: "How do I close the drawer from a button inside its content?",
answer: "Pass a render function as the drawer's children instead of elements. It receives the React Aria modal render props plus a `close` function: `{({ close }) => }`. This is handy for footer actions that need to dismiss the drawer without lifting state.",
},
{
question: "Can I change the width or styling of the drawer panel?",
answer: "Yes. The panel defaults to `w-full max-w-100`, sits flush against the right edge for the full viewport height, and both `className` and `dialogClassName` are merged with the built-in classes — `className` targets the overlay and sliding panel, while `dialogClassName` targets the inner dialog (the examples use `dialogClassName=\"gap-0\"` to remove the default spacing between header, content, and footer).",
},
{
question: "Which direction does the drawer animate from?",
answer: "It slides in from the right. The panel animates with `slide-in-from-right` over 300ms on enter and `slide-out-to-right` over 500ms on exit, while the translucent overlay behind it fades in and out over the same intervals.",
},
{
question: "How does the drawer handle focus and the Escape key?",
answer: "It is built on React Aria's `Modal` and `Dialog`, so focus is trapped inside the panel while it is open, focus returns to the trigger on close, and pressing `Escape` dismisses it. Set `isKeyboardDismissDisabled` to opt out. The dialog renders with `role=\"dialog\"` and a default `aria-label`, and `SlideoutMenu.Content` renders with `role=\"main\"` by default, which you can override with the `role` prop.",
},
]}
/>