Skip to content

DrawerPro

A temporary side surface built on the sheet: titled header that doubles as the drag handle, flick or drag past a third to close, any edge.

oxyn add drawer
Atlas · Runs

The drawer opens inside this window. Drag its header toward the edge, press Escape or the close button.

The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A temporary side surface for focused work next to the transcript: run details, a file preview, a settings panel.

When not to use

  • The dialog docked to an edge for inspectors and run details: use Sheet instead.
  • A sheet that rests at a peek or full height and follows your finger: use Bottom sheet instead.
  • An assistant docked beside a page: use AI side panel instead.

Installation

Drawer is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add drawer

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Right

From the right edge.

Atlas · Runs

The drawer opens inside this window. Drag its header toward the edge, press Escape or the close button.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Bottom

A bottom drawer.

Atlas · Runs

The drawer opens inside this window. Drag its header toward the edge, press Escape or the close button.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Inset

Floating inset panel.

Atlas · Runs

The drawer opens inside this window. Drag its header toward the edge, press Escape or the close button.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

Drawer

PropTypeDefaultDescription
titlerequiredString—Title.
descriptionOption<String>Default::default()Description.
sideString"right"`right` · `left` · `top` · `bottom`.
trigger_labelString"Open drawer"Trigger label.
sizef32380.0Width / height px.
insetboolDefault::default()Floating inset panel.
containedboolDefault::default()Contained.
footerOption<String>Default::default()Footer action.
childrenrequiredElement—Body.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EscapeClose and return focus to the trigger
TaborShiftTabCycle inside the drawer

Accessibility

  • role=dialog with aria-modal, title and description wired.
  • Close button labelled; dragging is never the only way to close.
From the spec

Dialog semantics with the title and description wired; close button labelled; dragging is never the only way out.

Motion & interaction

Springs in from its edge and leaves faster; the header is the drag handle and rubber-bands away from the edge. Inside previews it is contained so it never covers the page.

Timing
TransitionDurationEasingReduced motion
Enter280 msspringfade
Exit200 msease.infade
Scrim200 mslinearlinear

Responsive behaviour

  • Side drawers cap at the window width minus a gutter; top / bottom span the width.
Edge cases (spec)

Side drawers cap at the window minus a gutter; top / bottom span the width and cap at 32rem. Start-open demos render inside an app frame.

Notes for AI

  • Import Drawer from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: SheetEl in oxyn_gpui.
  • Props to set first: title, children.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI