Installation
CLI
Install the component using the StarUI CLI:
Examples
Direction
Drawers from all four edges — bottom gets a drag handle by default
Reactive
Order cart with per-item dismiss, running count, and empty state
No Handle
Cookie consent with show_handle=False and dismissible=False
Non-modal
Now-playing panel that doesn't trap focus or show a backdrop
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
signal |
str | Signal |
auto-generated |
Signal name for open state |
modal |
bool |
True |
Use showModal() for focus trapping and backdrop |
dismissible |
bool |
True |
Allow dismissing via click-outside and drag |
direction |
Literal['top','right','bottom','left'] |
'bottom' |
Edge the drawer slides from |
show_handle |
bool | None |
None |
Show the drag handle for swipe-to-dismiss (defaults to True for bottom, False otherwise) |
show_close |
bool |
False |
Show the default close button |
| Component | Description |
|---|---|
Drawer |
Root container managing open state and drag signals |
DrawerTrigger |
Button that opens the drawer |
DrawerContent |
Panel container; supports direction, show_handle, and show_close |
DrawerHeader |
Header layout for title and description |
DrawerTitle |
Accessible title linked to content |
DrawerDescription |
Supplementary description text |
DrawerFooter |
Footer area for actions |
DrawerClose |
Action that closes the drawer |