# Drawer > Bottom/side drawer panel with new DrawerTrigger and DrawerContent subcomponents. Source: https://shellui.dev/docs/v0.4/components/layout/drawer v0.3.0 adds `DrawerTrigger` and `DrawerContent` subcomponents. `Side` is set on `` itself. You can also bind `@bind-Open` to control open state externally — useful when you need a close button inside the content. ## What changed from v0.2.x | v0.2.1 | v0.3.0 | |--------|-------------| | External `IsOpen` + button required | `` lives inside `` | | Manual open state field | State fully encapsulated (or opt-in via `@bind-Open`) | ## Installation ```bash shellui add drawer ``` ## Usage ### Basic ```razor

Cart

Your cart is empty.

``` ### With external open control (`@bind-Open`) Use `@bind-Open` when you need a close button inside the content, or to control the drawer from outside: ```razor

Drawer Title

Drawer content here.

@code { private bool _drawerOpen = false; } ``` ### Side variants ```razor

Slides from the right.

``` ### Header, footer and close parts New in v0.4: `DrawerHeader`, `DrawerTitle`, `DrawerDescription`, `DrawerFooter` and `DrawerClose` structure the drawer. Anything wrapped in `DrawerClose` closes it when clicked. ```razor Daily goal How many steps do you want to walk today?
@code { private bool open; private decimal? steps = 8000; } ``` > **Compositional mode** > > `` switches to the parts when `Title` and `Description` are both empty, in the NuGet package and, from 0.4.0-alpha.3, in the CLI template. `Compositional="true"` turns it on explicitly. Before alpha.3, CLI components needed the flag. ## API Reference ### `` | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `Side` | `DrawerSide` | `Bottom` | Which edge the drawer slides from | | `Open` | `bool` | `false` | Bind with `@bind-Open` to control open state externally | | `OpenChanged` | `EventCallback` | — | Fires when open state changes | | `ChildContent` | `RenderFragment` | — | `DrawerTrigger` + `DrawerContent` | ### `` | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `ChildContent` | `RenderFragment` | — | Trigger button content | ### `` | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `ChildContent` | `RenderFragment` | — | Drawer body content | ### Structure parts | Component | Purpose | |-----------|---------| | `DrawerHeader` | Wraps the title and description | | `DrawerTitle` | The heading | | `DrawerDescription` | The supporting text | | `DrawerFooter` | Wraps the actions at the bottom | | `DrawerClose` | Closes the drawer when its content is clicked | Each takes `ChildContent`; all but `DrawerClose` also take `Class`. `Drawer` has a `Compositional` flag (`bool`, default `false`) to select this mode. ### `DrawerSide` enum `Top` · `Bottom` · `Left` · `Right`