CartFrom the right: items you can change, a running total, the checkout pinned to the footer.
Drawer
A panel sliding in from an edge: a RayDialog (focus, Escape, persistent, data-dialog-close, returnValue) with another look; modeless for side panels that keep the page interactive.
Patterns
FiltersFrom the left with a blurred backdrop; Apply reports what was picked.
Mobile navigationA floating panel (
floating, size="xs") with links and the account at the bottom.Build logFrom the bottom (
size="18rem"), with the status in the header.Inspector
modeless: no backdrop, the page stays usable; the button toggles it.Unsaved changesEscape and the backdrop are refused (
ray-request-close) while the note is edited.Positions and sizes
- ray-elements sticker pack$29.00
- Mechanical keycap set$48.00
- raylang mug$12.00
- Subtotal
- $101.00
- Shipping
- Free
- Total
- $101.00
Category
Sort by
12:00:01 build started on runner-3 12:00:02 resolving 14 dependencies 12:00:04 compiled 42 modules 12:00:04 warn unused import std/fs in src/sync.ray:3 12:00:05 tests: 128 passed, 0 failed 12:00:05 done in 4.1 s
- tag
- ray-card
- padding
- lg
- radius
- lg
- with-border
- true
- size
- 320 × 184
No backdrop and no scroll lock: keep scrolling the page while it is open. Escape or × closes it.
position="end" · size="sm"
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-drawer> · RayDrawer
Any slotted element with data-dialog-close closes it. JS: show(), close(returnValue).
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
open | open reflects | boolean | Shown. | |
label | label | string | Heading (also the accessible name). | |
description | description | string | A line under the title (the drawer's accessible description). | |
position | position reflects | end | start | right | left | top | bottom | end | The edge it slides from: start/end follow the writing direction; left/right are sides of the screen. |
size | size reflects | string | md | Width (left/right) or height (top/bottom): xs…xl, full, content (as big as what it holds, up to the viewport: a bottom sheet) or any CSS length. |
modeless | modeless reflects | boolean | No backdrop nor scroll lock: the page stays interactive (a side panel). | |
floating | floating reflects | boolean | Detached from the edge, with rounded corners. | |
persistent | persistent reflects | boolean | Escape and backdrop clicks do not close it. | |
hideClose | hide-close reflects | boolean | No close button in the header. | |
closeLabel | close-label | string | Close (text drawer.close) | The close button's name, for screen readers. |
overlayBlur | overlay-blur | string | Blur of the page behind: px ("8"), a CSS length or "none". Default: --ray-overlay-blur ([overlay] blur in tokens.toml). |
| Event | Description |
|---|---|
ray-open | After it opened. |
ray-close | After it closed; detail: { returnValue }. |
ray-request-close | Escape, backdrop or close button; cancelable. |
| Slot | Description |
|---|---|
| (default) | Body (scrolls). |
header | Extra header content. |
footer | Actions, at the bottom. |
| Part | Description |
|---|---|
drawer | The native <dialog>. |
body | The body. |
Texts
What it writes itself, in English; setStrings() translates them (Getting started: Languages).
| Key | English |
|---|---|
drawer.close | Close |