Skip to main content

Sheet

A panel that slides in from an edge.

Left out of Brand expressive Phones first: drawer is the bottom panel for phones and already holds the menu, and dialog holds the waitlist form. Use instead: Drawer, Dialog

See it live​

Start Storybook to see it live: npm run storybook

When to use it​

  • 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:

  • Dialog: A centered blocking window.
  • Drawer: The bottom panel for phones.

How Brand expressive uses it​

A menu or dialog
Use elevation.overlay and a dimmed page
Not No shadow
Strong depth shows a menu or dialog sits above vivid sections. Without a shadow it blends into the color blocks.

Words​

  • Headlines are short and bold. Three to six words.
  • Verbs that move: Join, Try, Go.
  • Playful in headlines, plain in errors.
  • Use: Join, Drop, Go, Love. Avoid: Synergy, Leverage, Kindly.

The labels components use, from the voice tokens:

  • content.action.commit: Go
  • content.action.cancel: Not now
  • content.action.destroy: Remove
  • content.action.retry: Try again
  • content.action.empty-action: Explore the drop

See Voice and tone for the whole voice.

Accessibility and keyboard​

KeyboardWhat happensNot
undefinedEscape 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.

Changes with theme

Brand expressive decides what changes when you switch theme. Here a switch changes colors only, so the marked rows differ between light and dark; everything else holds steady.

PartIts token and the semantic it aliasesValue
Shared
Transition panels durationcomponent.transition.panels-durationmotion.duration.panelsvar(--transition-panels-duration)duration.moderate:200ms
Overlay
Fill
Changes with theme
component.sheet.overlay.backgroundcolor.surface.scrimvar(--sheet-overlay-background)Lightblack.light.scrim:#0000008CDarkblack.dark.scrim:#000000B3
Content
Gapcomponent.sheet.content.gapspace.gap.groupvar(--sheet-content-gap)space.40:2.5rem
Fill
Changes with theme
component.sheet.content.backgroundcolor.surface.canvasvar(--sheet-content-background)Lighttaupe.light.50:#FFF8F3Darktaupe.dark.0:#120B09
Shadow
Changes with theme
component.sheet.content.shadowelevation.overlayvar(--sheet-content-shadow)Lightshadow.overlayDarkshadow.overlay-dark
Sheet
Cornercomponent.sheet.radiusradius.badgevar(--sheet-radius)radius.999:9999px
Focus ring offset
Changes with theme
component.sheet.focus-ring-offsetcolor.surface.canvasvar(--sheet-focus-ring-offset)Lighttaupe.light.50:#FFF8F3Darktaupe.dark.0:#120B09
Focus
on focus
component.sheet.focusborder-width.focusvar(--sheet-focus)border-width.3:3px
Focus ring focus
Changes with theme
on focus
component.sheet.focus-ring-focuscolor.border.focusvar(--sheet-focus-ring-focus)Lightpink.light.600:#D61F7ADarkpink.dark.600:#F59ACA
Background open
Changes with theme
when open
component.sheet.background-opencolor.action.secondaryvar(--sheet-background-open)Lighttaupe.light.0:#FFFFFFDarktaupe.dark.50:#1F1411
Icon sizecomponent.sheet.icon-sizesize.iconvar(--sheet-icon-size)size.20:1.25rem
Header
Gapcomponent.sheet.header.gapcomponent-spacing-map.x2var(--sheet-header-gap)space.8:0.5rem
Paddingcomponent.sheet.header.paddingspace.inset.containervar(--sheet-header-padding)space.32:2rem
Footer
Gapcomponent.sheet.footer.gapspace.gap.defaultvar(--sheet-footer-gap)space.16:1rem
Paddingcomponent.sheet.footer.paddingspace.inset.containervar(--sheet-footer-padding)space.32:2rem
Title
Weightcomponent.sheet.title.font-weighttype.title.font-weightvar(--sheet-title-font-weight)font.weight.800:800
Text
Changes with theme
component.sheet.title.labelcolor.text.primaryvar(--sheet-title-label)Lighttaupe.light.900:#1F1411Darktaupe.dark.900:#FFF8F3
Description
Text sizecomponent.sheet.description.font-sizetype.body.font-sizevar(--sheet-description-font-size)font.size.17:1.0625rem
Text
Changes with theme
component.sheet.description.labelcolor.text.mutedvar(--sheet-description-label)Lighttaupe.light.600:#6B544ADarktaupe.dark.400:#B5988A
From the system
Edge
Changes with theme
color.border.default
straight from the system, through --border
Lighttaupe.light.200 · #F2DCCFDarktaupe.dark.100 · #33241F