Components

Drawer

A drawer is a cover overlay from the right — the same modal contract as Dialog, not a push layout. It opens a task without losing the list behind the scrim. Persistent navigation is Side nav.

Anatomy

Moderation queue · 412 reviews · the list stays visible at 40% ink
Flag this review?

The organiser will not see it until you decide. This cannot be undone from the queue.

Same tokens as center Dialog: 40% ink scrim (z-overlay), panel at z-modal with hairline and shadow-overlay. Entry uses anim-slide-in-end — transform is allowed here because a side drawer is a sheet on another axis.

Specification

PropertyValueWhy
Recipedialog({ placement: 'side', size })One overlay language — drawer is Dialog on the right axis
Scrim40% ink, z-overlaySame as center Dialog — the page stays readable
Panelz-modal, full height, rounded left onlySlides from the edge; top and bottom flush
Widthsize="sm" 28rem · md 42rem · lg 1200px maxReuses dialog size tokens — no new measures
Motionanim-slide-in-end, 180msTransform allowed for sheets and drawers only
PushNot supportedPush reflows the whole dashboard; cover keeps focus on the task

Structure

<!-- Radix Dialog with side placement — behaviour is Radix, classes are ours -->
<Dialog.Overlay class={d.overlay()} />
<Dialog.Content class={d.content({ placement: 'side', size: 'sm' })}>
  <Dialog.Title class={d.title()}>Flag this review?</Dialog.Title>
  <Dialog.Description class={d.description()}>
    The organiser will not see it until you decide.
  </Dialog.Description>
  <Dialog.Footer class={d.footer()}>
    <Button variant="secondary">Cancel</Button>
    <Button variant="destructive">Hide review</Button>
  </Dialog.Footer>
</Dialog.Content>

Props

PropTypeDefaultNotes
placement'center' | 'sheet' | 'side''center'sheet is bottom (Capacitor). side is this drawer.
size'sm' | 'md' | 'lg' | 'full''sm'Sets max width on side; sets centered width on center
scale'md' | 'sm''md'Tightens padding and type in dashboard contexts

Rules

  • Same modal contract as Dialog. Scrim, focus trap, Escape to close, focus returned to the trigger. Close on navigation — the reader asked for a page, not for the panel to stay open.
  • Title is a question. Confirm verb matches the title. Cancel is always "Cancel." — see Dialog copy contract.
  • Never push the page. If the layout must persist beside navigation, use Side nav expanded or rail mode.
  • Bottom sheet is not a side drawer. placement="sheet" stays on Capacitor and mobile filters; do not reuse it for moderation panels.

See also: Dialog (center and bottom sheet) · Motion (allowed transforms) · Layers (modal at 400)

Sporting Scouter Design System
Every token on this site is generated from theme.css.