AsideDrawer

OverviewExamplesPropertiesSlotsEventsUsageIntegration

A drawer panel inside `<nord-aside>`.

Properties

PropertyAttribute Description TypeDefault
defaultWidthdefault-widthInitial width in px. The persisted value overrides this on load; if `default-width` changes between sessions, the persisted value is re-seeded to the new default.number420
minWidthmin-widthResize clamp lower bound in px.number280
maxWidthmax-widthResize clamp upper bound in px. Defaults to `Number.MAX_SAFE_INTEGER` so an unset `max-width` doesn't constrain the drawer — the consumer's layout (or the rail / nav anchoring) determines the practical ceiling. Set an explicit value to clamp. Not reflected: an unset cap is the `Number.MAX_SAFE_INTEGER` sentinel, which must never render into the DOM as `max-width="9007199254740991"`.number
maxFullscreenWidthmax-fullscreen-widthMaximum inline-size in px the drawer can reach when `[fullscreen]` is active. Independent of `max-width` (which only caps the docked drag / keyboard resize) — fullscreen typically wants to grow larger than the docked maximum. Defaults to `Number.MAX_SAFE_INTEGER` so an unset value lets fullscreen fill all available room (bounded by the layout's left-cap rule in `<nord-aside>`). Not reflected: an unset cap is the `Number.MAX_SAFE_INTEGER` sentinel, which must never render into the DOM.number
disableddisabledWhen set, the drawer cannot be opened. Programmatic opens are silently ignored; if the drawer is already open and this flips on, the drawer stays open until closed normally.booleanfalse
fullscreenfullscreenReflected. Phase 3 wires the overlay sizing internally.booleanfalse
floatingfloatingSet by the parent `<nord-aside>` when the drawer renders as a narrow floating overlay (rather than a docked region). When `true` the host becomes an accessible modal dialog (`role="dialog"` + `aria-modal`); when `false` the host is a `role="region"` landmark. Drive this only through the parent — it owns the floating-vs-docked decision.booleanfalse

Slots

Slot name Description
Default slotDefault slot. Place arbitrary drawer content here.
EventDetail TypeDescription
width-changeAsideDrawerWidthChangeEventDispatched when the drawer's width changes. The event exposes `width` (the new applied inline-size in px) and `source` (`'drag' | 'keyboard' | 'attribute' | 'storage'`).

Usage

This section includes guidelines for designers and developers about the usage of this component in different contexts.

Do

  • Place inside <nord-aside>’s default slot, one per surface the user can toggle.
  • Give each drawer a unique id<nord-aside>’s active-drawer attribute matches against it.
  • Put arbitrary content in the default slot: a <nord-drawer>, a custom component, plain markup, an <iframe> you instantiate yourself.
  • Use default-width, min-width, and max-width to define the resize range; the component persists the user’s chosen width per drawer id.

Don’t

  • Don’t use outside of <nord-aside> — the parent owns open/closed state.
  • Don’t manage the panel’s visibility yourself. The drawer is always mounted and toggled via the ancestor’s active-drawer.
  • Don’t share an id between drawers — width persistence and trigger wiring both key off it.

Additional considerations

  • Always mounted. Shown when the ancestor <nord-aside>’s active-drawer matches this drawer’s id, otherwise hidden via the native [hidden] attribute.
  • The component sizes the panel and owns its open/closed state; the consumer owns the contents.
  • Emits width-change with { width, source } where source is 'drag' | 'keyboard' | 'attribute' | 'storage'.
  • Width is persisted in localStorage under the drawer’s id. If default-width changes between sessions, the persisted value is re-seeded to the new default.

Integration

For integration guidelines, please see Web Components documentation .

Was this page helpful?

Yes No

We use this feedback to improve our documentation.