Sheet
A panel that slides in from an edge.
In Multi-brand
See it live
npm run storybookWhen to use it
In Multi-brand: The menu on a phone.
- Use it when: Filters, details or a secondary form while the page stays in view.
- Not when: A blocking decision (dialog), or a tiny confirmation.
Instead:
How Multi-brand uses it
Words
- Shared structure: object, state, next step.
- Brand tone lives in headlines and marketing copy, not in errors.
- Errors and confirmations read the same in every brand.
- Use: Get started, Plan, Order. Avoid: Brand-specific words in errors, Jargon.
The labels components use, from the voice tokens:
content.action.commit: Savecontent.action.cancel: Cancelcontent.action.destroy: Removecontent.action.retry: Try againcontent.action.empty-action: Get started
See Voice and tone for the whole voice.
Accessibility and keyboard
| Keyboard | What happens | Not |
|---|---|---|
| undefined | Escape closes it. | undefined |
Test before you ship:
- It behaves as a dialog: named, focus moves in and back. undefined
Use it in code
npx open-ds add sheet
The component reads only component keys and semantic tokens, so it follows the brand and mode on <html>.
Tokens it reads
Sheet reads 19 tokens of its own, each an alias of a semantic token. Each row is one part: its own token, the semantic it aliases, and the value it ends at. Change a semantic and every component that reads it follows; override one of Sheet's tokens to change Sheet alone.
Multi-brand decides what changes when you switch theme. Here a switch changes colors, type and shape, so the marked rows differ between its brands and between light and dark; everything else holds steady.
| Part | Its token and the semantic it aliases | Value |
|---|---|---|
| Shared | ||
| Transition panels duration | component.transition.panels-durationmotion.duration.panelsvar(--transition-panels-duration) | duration.relaxed:320ms |
| Overlay | ||
| Fill Changes with theme | component.sheet.overlay.backgroundcolor.surface.scrimvar(--sheet-overlay-background) | Aster Lightblack.light.scrim:#0000008CAster Darkblack.dark.scrim:#000000B3Birch Lightblack.light.scrim:#0000008CBirch Darkblack.dark.scrim:#000000B3Coral Lightblack.light.scrim:#0000008CCoral Darkblack.dark.scrim:#000000B3 |
| Content | ||
| Gap | component.sheet.content.gapspace.gap.groupvar(--sheet-content-gap) | space.24:1.5rem |
| Fill Changes with theme | component.sheet.content.backgroundcolor.surface.canvasvar(--sheet-content-background) | Aster Lightslate-deep.light.50:#F8FAFCAster Darkslate-deep.dark.0:#020617Birch Lightslate-deep.light.50:#F8FAFCBirch Darkslate-deep.dark.0:#020617Coral Lightslate-deep.light.50:#F8FAFCCoral Darkslate-deep.dark.0:#020617 |
| Shadow Changes with theme | component.sheet.content.shadowelevation.overlayvar(--sheet-content-shadow) | Aster Lightshadow.overlayAster Darkshadow.overlay-darkBirch Lightshadow.overlayBirch Darkshadow.overlay-darkCoral Lightshadow.overlayCoral Darkshadow.overlay-dark |
| Sheet | ||
| Corner Changes with theme | component.sheet.radiusradius.badgevar(--sheet-radius) | Aster Lightradius.4:0.25remAster Darkradius.4:0.25remBirch Lightradius.999:9999pxBirch Darkradius.999:9999pxCoral Lightradius.999:9999pxCoral Darkradius.999:9999px |
| Focus ring offset Changes with theme | component.sheet.focus-ring-offsetcolor.surface.canvasvar(--sheet-focus-ring-offset) | Aster Lightslate-deep.light.50:#F8FAFCAster Darkslate-deep.dark.0:#020617Birch Lightslate-deep.light.50:#F8FAFCBirch Darkslate-deep.dark.0:#020617Coral Lightslate-deep.light.50:#F8FAFCCoral Darkslate-deep.dark.0:#020617 |
| Focus on focus | component.sheet.focusborder-width.focusvar(--sheet-focus) | border-width.2:2px |
| Focus ring focus Changes with theme on focus | component.sheet.focus-ring-focuscolor.border.focusvar(--sheet-focus-ring-focus) | Aster Lightteal.light.600:#0F766EAster Darkteal.dark.600:#7FCFC6Birch Lightpurple.light.600:#6D28D9Birch Darkpurple.dark.600:#B79DF7Coral Lightorange.light.600:#C2410CCoral Darkorange.dark.600:#F7A67F |
| Background open Changes with theme when open | component.sheet.background-opencolor.action.secondaryvar(--sheet-background-open) | Aster Lightslate-deep.light.0:#FFFFFFAster Darkslate-deep.dark.50:#0F172ABirch Lightslate-deep.light.0:#FFFFFFBirch Darkslate-deep.dark.50:#0F172ACoral Lightslate-deep.light.0:#FFFFFFCoral Darkslate-deep.dark.50:#0F172A |
| Icon size | component.sheet.icon-sizesize.iconvar(--sheet-icon-size) | size.16:1rem |
| Header | ||
| Gap | component.sheet.header.gapcomponent-spacing-map.x2var(--sheet-header-gap) | space.8:0.5rem |
| Padding | component.sheet.header.paddingspace.inset.containervar(--sheet-header-padding) | space.24:1.5rem |
| Footer | ||
| Gap | component.sheet.footer.gapspace.gap.defaultvar(--sheet-footer-gap) | space.12:0.75rem |
| Padding | component.sheet.footer.paddingspace.inset.containervar(--sheet-footer-padding) | space.24:1.5rem |
| Title | ||
| Weight | component.sheet.title.font-weighttype.title.font-weightvar(--sheet-title-font-weight) | font.weight.600:600 |
| Text Changes with theme | component.sheet.title.labelcolor.text.primaryvar(--sheet-title-label) | Aster Lightslate-deep.light.900:#0F172AAster Darkslate-deep.dark.900:#F8FAFCBirch Lightslate-deep.light.900:#0F172ABirch Darkslate-deep.dark.900:#F8FAFCCoral Lightslate-deep.light.900:#0F172ACoral Darkslate-deep.dark.900:#F8FAFC |
| Description | ||
| Text size | component.sheet.description.font-sizetype.body.font-sizevar(--sheet-description-font-size) | font.size.16:1rem |
| Text Changes with theme | component.sheet.description.labelcolor.text.mutedvar(--sheet-description-label) | Aster Lightslate-deep.light.600:#4B5A6FAster Darkslate-deep.dark.400:#96A3B5Birch Lightslate-deep.light.600:#4B5A6FBirch Darkslate-deep.dark.400:#96A3B5Coral Lightslate-deep.light.600:#4B5A6FCoral Darkslate-deep.dark.400:#96A3B5 |
| From the system | ||
| Edge Changes with theme | color.border.default straight from the system, through --border | Aster Lightslate-deep.light.200 · #E2E8F0Aster Darkslate-deep.dark.100 · #1E293BBirch Lightslate-deep.light.200 · #E2E8F0Birch Darkslate-deep.dark.100 · #1E293BCoral Lightslate-deep.light.200 · #E2E8F0Coral Darkslate-deep.dark.100 · #1E293B |