Drawer

The Drawer component provides a reusable pattern for drawer in the interface.

Drawer

Note: We've removed the placement of the buttons to prevent issues with documentation. Remove the values from the classList to get the intended layout.

API

Parameter Default Type Description
Close string -
[] array -
[] array -

CSS API

Variable Default Type Values Description
var(--space) range - Base spacing unit. Used for padding and margin inside components.
var(--base) range - Main unit that drives radius and spacing scales.
var(--color--primary) color - Controls the main drawer background when the drawer is duotone.
var(--color--primary-contrast) color - Primary Contrast
var(--color--secondary) color - Controls the secondary navigation area when the drawer is duotone.
var(--color--secondary-contrast) color - Secondary Contrast
var(--color--surface) color - Controls the default drawer background, text contrast, field colors, and surface borders.
var(--shadow-color) rgba - Controls the color used by the drawer shadow.
var(--shadow-amount) range - Controls how strong the drawer shadow appears when open.
var(--color--surface-contrast) color - Used for text and icons on surface backgrounds with less contrast.
var(--color--surface-border) color - Manual companion token for borders on surface elements.
var(--color--alpha) rgba - Controls the dimmed backdrop shown behind an open drawer, including its opacity.
2 range - Scales drawer padding locally while keeping vertical nav padding slightly tighter on the y-axis.
1 range - Multiplies the default drawer width without changing the global base unit.

Similar components