Navigation
SpeedDial
Expands a floating primary action into a compact set of related actions.
01
See it and copy it
Framework example
Choose Astro, React, or Elements to compare native usage against the shared visual output. Each example assumes the framework-level setup is already complete.
Project canvasWhat would you like to add?Open the quick-create menu to choose an action.
Framework usage
Switch targets to compare the adapter code. The preview stays visually stable because all three packages share the same tokens andui-* class contract.---
import { SpeedDial } from '@santi020k/lumen-astro'
---
<div class="speed-dial-example">
<div class="speed-dial-example__copy">
<span>Project canvas</span>
<strong>What would you like to add?</strong>
<small>Open the quick-create menu to choose an action.</small>
</div>
<SpeedDial
actions={[
{ icon: 'file-plus-2', label: 'New document', value: 'document' },
{ icon: 'folder-plus', label: 'New folder', value: 'folder' },
{ icon: 'image-plus', label: 'Upload media', value: 'media' }
]}
defaultOpen
label="Create new"
/>
</div>
<style>
.speed-dial-example {
display: flex;
width: min(100%, 42rem);
min-height: 17rem;
align-items: flex-end;
justify-content: space-between;
gap: 2rem;
margin-inline: auto;
padding: 2rem;
border: 1px solid hsl(var(--line));
border-radius: 1rem;
background: hsl(var(--surface) / 0.78);
box-shadow: var(--ui-shadow-md);
}
.speed-dial-example__copy {
display: grid;
align-self: flex-start;
gap: 0.35rem;
}
.speed-dial-example__copy span {
color: hsl(var(--brand));
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.09em;
text-transform: uppercase;
}
.speed-dial-example__copy strong {
color: hsl(var(--ink));
font-size: 1.1rem;
}
.speed-dial-example__copy small {
max-width: 23rem;
color: hsl(var(--ink-muted));
line-height: 1.55;
}
@media (max-width: 36rem) {
.speed-dial-example {
min-height: 20rem;
padding: 1.25rem;
}
.speed-dial-example__copy {
max-width: 11rem;
}
}
</style>import { SpeedDial } from '@santi020k/lumen-react'
export const Example = () => (
<>
<div className="speed-dial-example">
<div className="speed-dial-example__copy">
<span>Project canvas</span>
<strong>What would you like to add?</strong>
<small>Open the quick-create menu to choose an action.</small>
</div>
<SpeedDial
actions={[
{ icon: 'file-plus-2', label: 'New document', value: 'document' },
{ icon: 'folder-plus', label: 'New folder', value: 'folder' },
{ icon: 'image-plus', label: 'Upload media', value: 'media' }
]}
defaultOpen
label="Create new"
/>
</div>
<style>
.speed-dial-example {
display: flex;
width: min(100%, 42rem);
min-height: 17rem;
align-items: flex-end;
justify-content: space-between;
gap: 2rem;
margin-inline: auto;
padding: 2rem;
border: 1px solid hsl(var(--line));
border-radius: 1rem;
background: hsl(var(--surface) / 0.78);
box-shadow: var(--ui-shadow-md);
}
.speed-dial-example__copy {
display: grid;
align-self: flex-start;
gap: 0.35rem;
}
.speed-dial-example__copy span {
color: hsl(var(--brand));
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.09em;
text-transform: uppercase;
}
.speed-dial-example__copy strong {
color: hsl(var(--ink));
font-size: 1.1rem;
}
.speed-dial-example__copy small {
max-width: 23rem;
color: hsl(var(--ink-muted));
line-height: 1.55;
}
@media (max-width: 36rem) {
.speed-dial-example {
min-height: 20rem;
padding: 1.25rem;
}
.speed-dial-example__copy {
max-width: 11rem;
}
}
</style>
</>
)<script type="module">
import { defineLumenElements } from '@santi020k/lumen-elements/define'
defineLumenElements()
</script>
<div class="speed-dial-example">
<div class="speed-dial-example__copy">
<span>Project canvas</span>
<strong>What would you like to add?</strong>
<small>Open the quick-create menu to choose an action.</small>
</div>
<lumen-speed-dial
actions={[
{ icon: 'file-plus-2', label: 'New document', value: 'document' },
{ icon: 'folder-plus', label: 'New folder', value: 'folder' },
{ icon: 'image-plus', label: 'Upload media', value: 'media' }
]}
defaultOpen
label="Create new"></lumen-speed-dial>
</div>
<style>
.speed-dial-example {
display: flex;
width: min(100%, 42rem);
min-height: 17rem;
align-items: flex-end;
justify-content: space-between;
gap: 2rem;
margin-inline: auto;
padding: 2rem;
border: 1px solid hsl(var(--line));
border-radius: 1rem;
background: hsl(var(--surface) / 0.78);
box-shadow: var(--ui-shadow-md);
}
.speed-dial-example__copy {
display: grid;
align-self: flex-start;
gap: 0.35rem;
}
.speed-dial-example__copy span {
color: hsl(var(--brand));
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.09em;
text-transform: uppercase;
}
.speed-dial-example__copy strong {
color: hsl(var(--ink));
font-size: 1.1rem;
}
.speed-dial-example__copy small {
max-width: 23rem;
color: hsl(var(--ink-muted));
line-height: 1.55;
}
@media (max-width: 36rem) {
.speed-dial-example {
min-height: 20rem;
padding: 1.25rem;
}
.speed-dial-example__copy {
max-width: 11rem;
}
}
</style>02
Choose your target
Add this component
Choose the package for your runtime. All adapters share the Lumen stylesheet. Use the matching registry command when you want a local wrapper for that framework.
pnpm add @santi020k/lumen-astropnpm add @santi020k/lumen-astrolumen add SpeedDiallumen add SpeedDialpnpm add @santi020k/lumen-reactpnpm add @santi020k/lumen-reactlumen add SpeedDial --target reactlumen add SpeedDial --target reactpnpm add @santi020k/lumen-elementspnpm add @santi020k/lumen-elementslumen add SpeedDial --target elementslumen add SpeedDial --target elementsAPI reference
Lumen-specific props and runtime attributes for the Astro primitive. React props follow the same names; Elements use equivalent kebab-case attributes where custom elements expose them.
| Attribute | Values | Default | Description |
|---|---|---|---|
| actions | Array<{ icon?, label, value? }> | [] | Creates labelled menu actions and renders optional Lumen icons. |
| defaultOpen | boolean | false | Sets the initial expanded state. |
| direction | "up" | "down" | "left" | "right" | "up" | Controls the direction in which actions expand. |
| label | string | "Actions" | Names both the trigger and its action menu for assistive technology. |
| UIPrimitives | Astro runtime | required | Adds click-away dismissal and complete trigger and menu keyboard behavior. React provides equivalent behavior. |
| class, className | string | "" | Merges custom classes with the generated ui-* root classes. |
| ...native attributes | HTML attributes | - | Forwards standard attributes to the root element unless the component consumes them. |
Keyboard interactions
Keyboard behavior provided by the Astro UIPrimitives runtime for this component.
| Key | Action |
|---|---|
| Enter, Space on trigger | Open or close the action menu. |
| Arrow keys on trigger | Open the menu and move focus to its first or last action. |
| Arrow keys in menu | Move focus through actions, wrapping at either end. |
| Home, End in menu | Move focus to the first or last action. |
| Escape | Close the action menu and return focus to the trigger. |