Skip to content
Twentyfirst UIHalo

Drawer

Overlays · Badge, Drawer, StatTile, Tabs

Right-side sheet for a record's details, sliding in over the page.

Props: title, subtitle, avatar (name for an Avatar), onClose, width, inline (render inside a positioned container, for previews), children.

  • Use for a record you look at without leaving the list: a customer, an invoice, a run.
  • Traps keyboard focus, closes on Esc and backdrop click, returns focus to the opener.
  • Put Tabs right under the badges when the record has more than one view.

Props

Badge

PropTypeNotes
tone?Tone
dot?boolean
live?boolean
children?ReactNode
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

Drawer

PropTypeNotes
titlestringRequired
subtitle?ReactNode
avatar?string
onClose?() => void
width?number | string
inline?boolean
children?ReactNode
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

StatTile

PropTypeNotes
valueReactNodeRequired
labelstringRequired
tint?Tint | "surface" | "placeholder"
delta?string
delay?number
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.

Tabs

PropTypeNotes
itemsstring[]Required
value?string
defaultValue?string
onChange?(v: string) => void
block?boolean
className?stringExtra class on the root element.
style?CSSPropertiesInline style on the root element.