AhaSlides Design
v0.52.0React · Vue · Lit

Components · Feedback

Drawer

A side panel that slides in for a longer edit or detail view — rendered through the shared Drawer.

Examples

API

PropTypeDefaultNotes
openbooleanfalseControls visibility
titlestringPanel heading
placementtop | right | bottom | leftrightWhich edge it slides from
widthnumber | string378Panel width for left/right (large ≈ 736)
heightnumber | string378Panel height for top/bottom (large ≈ 480)
sizedefault | largedefaultantd preset size (378/736 l·r); the DS default is 378
footerReactNodePinned actions row (keep the primary action here)
maskbooleantrueDim + scroll-lock the page behind the panel
closablebooleantrueShow the header close (X)
onClose() => voidDismiss handler

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/drawer-theme';   // registers <drawer>

Agent feed for this component (absolute, fetchable anywhere): drawer.agent.json · drawer.md · drawer.llms.txt

When to use

When to use
  • Drawer — a longer edit form or detail panel where keeping page context matters
  • Modal — a short, blocking decision the user must complete first
  • a page — the task is large enough to deserve its own route
Give it a clear title and keep the primary action pinned in a footer. Right placement for settings/edit; bottom for mobile-style sheets.
Surfaces
editor dashboard settings

Spec

Panel white surface, slides from the right (or any edge) · Title ink #1A1A1A · SemiBold · Body 24 padding · ink text · Mask ink overlay rgba(26,26,46,.7) · Motion antd's built-in slide enter/leave (kept)