BetaPublic beta — Read the release notes
Documentation

Drawer

Slide-in panel from any screen edge.

Package
@solidiom/drawer
Version
0.0.1-next.0
Status
stable

Preview

This preview uses documentation-only styling. Ship with one of the included recipe outputs (CSS, Tailwind, or UnoCSS) for production styles.

Slide-in panel from any screen edge.

Usage

Compose Root, Trigger, Backdrop, Content, Close, Title, Description.

import * as Drawer from "@solidiom/drawer"

;<Drawer.Root>Drawer content</Drawer.Root>

Installation

Install the package with pnpm add @solidiom/drawer. The package requires compatible solid-js and @solidjs/web peer dependencies.

Parts

Drawer exposes 7 parts:

  • Rootdata-part="root".
  • Triggerdata-part="trigger".
  • Backdropdata-part="backdrop".
  • Contentdata-part="content".
  • Closedata-part="close".
  • Titledata-part="title".
  • Descriptiondata-part="description".

Styling

Drawer carries data-scope="drawer" and data-part attributes on each part for CSS/recipe targeting. State attributes like data-state, data-disabled, and data-highlighted are exposed where applicable.

Keyboard & behavior

This primitive has no keyboard interaction. It renders content that does not independently receive focus or respond to key events.

Composition

Drawer is designed to compose with other primitives. Its parts can be combined with Field, Button, or other primitives as needed.

SSR and hydration

Drawer renders as semantic HTML during server rendering. Interactive behavior (keyboard handlers, state management) activates on hydration without layout shift.