← All Components
<mth-speed-dial>
Floating speed-dial FAB revealing contextual secondary actions with roving focus and Escape dismissal.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-speed-dial>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/speed-dial"></script>
<mth-speed-dial direction="up" variant="primary">Example</mth-speed-dial>import '@methane-ui/ui/speed-dial';
import '@methane-ui/react';
export function Example() {
return <mth-speed-dial direction="up" variant="primary">Example</mth-speed-dial>;
}<script setup lang="ts">
import '@methane-ui/ui/speed-dial';
</script>
<template>
<mth-speed-dial direction="up" variant="primary">Example</mth-speed-dial>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/speed-dial';
import { MthSpeedDialDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthSpeedDialDirective],
template: `<mth-speed-dial direction="up" variant="primary">Example</mth-speed-dial>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/speed-dial';
import MthSpeedDial from '@methane-ui/svelte/MthSpeedDial.svelte';
</script>
<MthSpeedDial direction="up" variant="primary">Example</MthSpeedDial>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
open | open | boolean | false | Whether the speed-dial action tray is expanded. |
direction | direction | 'up' | 'down' | 'start' | 'end' | "up" | Expansion direction relative to the trigger (up, down, start, or end). |
label | label | string | "" | Accessible aria-label for the main trigger button. |
disabled | disabled | boolean | false | Disables trigger interaction. |
variant | variant | 'primary' | 'surface' | 'secondary' | "primary" | Trigger button style (primary, surface, or secondary). |
size | size | 'sm' | 'md' | 'lg' | "md" | Trigger dimension scale (sm, md, or lg). |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-open | { open: true } | Cancelable event fired before expanding actions. |
mth-after-open | { open: true } | Fired after actions finish expanding. |
mth-close | { reason: string } | Fired when actions close. |
mth-after-close | { reason: string } | Fired after close completes and focus returns to the trigger. |
mth-select | { value: string; label: string } | Fired when a speed-dial action item is activated. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| Enter | both | Trigger button is focused | Toggles speed-dial actions menu open/closed |
| ArrowUp | both | Actions menu is open in vertical direction | Moves focus between speed-dial action items |
| ArrowDown | both | Actions menu is open in vertical direction | Moves focus between speed-dial action items |
| Escape | both | Actions menu is open | Closes speed-dial and restores focus to trigger |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 4 APG keyboard transitions across LTR/RTL. | mth-speed-dial.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(open), :state(disabled). | Conformance suite |
| i18n | Routes 2 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |