Skip to content
UI Brok

Loading…

No results

Browse catalog

Speed Dial

A floating action button that expands a stack of contextual actions with animated transitions.

Preview

Controls

Theme
Surface
Direction
Viewport

Device view renders in an isolated frame so real responsive breakpoints apply. Switch to Full for overflowing popovers.

Installation

terminal
php artisan ui:add speed-dial

Behavior layer (Alpine)

This component installs a self-registering Alpine module to resources/js/ui/speed-dial.js. Import the behavior layer once from your bundle so it loads (it hooks alpine:init):

resources/js/ui/index.js JS
import './speed-dial.js';

Registry contract

Install confidence

php artisan ui:add speed-dial writes only the generated targets below. The CLI validates each file hash before writing and prompts before replacing local changes unless --force is used.

Version
1.0.0
License
open
Stability
stable
Contract
v2
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/components/ui/speed-dial.blade.php
js resources/js/ui/speed-dial.js

Registry dependencies

None.

Package dependencies

composer: jml/brok:^1.0

npm: alpinejs

Guidance

Secondary action menu

Provide compact access to secondary actions.

Use when

  • Use for secondary actions when compact access is more important than constant visibility. Do not hide the most frequent or highest-value actions in a menu when discoverability matters.

Avoid when

  • Avoid using speed-dial as a default simply because it is available in the library. Choose it only when its interaction cost, visibility, and behavior match the job to be done.
Task length
micro
Interaction cost
medium
Interruptiveness
none
Input precision
none
Mobile / touch risk
medium
Accessibility risk
high
Needs background context
Yes
Comparison needed
No

Preferred alternatives

  • Visible button for frequent actions
  • Inline action bar

Anti-patterns

  • Hiding primary actions in menus

API

manifest knowledge + registry-derived coverage

Props

Prop Type / values Default Description
open bool false Declared by @props in the registry Blade source.
direction string up Declared by @props in the registry Blade source.
label string Actions Declared by @props in the registry Blade source.

Slots

  • default — Primary Blade slot rendered by the component.

Data slots

speed-dial speed-dial-actions speed-dial-trigger

Capabilities

wcag-2.2-aa-target interactive responsive rtl darkMode localized

Behavior

  • Uses server-rendered Blade and semantic HTML.
  • Installs a JavaScript behavior module when the registry item includes resources/js/ui files.
  • Declares registry capability flags: a11y, interactive, responsive, rtl, darkMode, localized.

Usage

previews.components.speed-dial.default.blade.php Blade
<div class="flex min-h-48 items-end justify-center pb-6">
    <x-ui.speed-dial label="{{ __('Actions') }}">
        {{-- Edit --}}
        <button
            type="button"
            role="menuitem"
            aria-label="{{ __('Edit') }}"
            class="inline-flex size-10 items-center justify-center rounded-full bg-popover text-popover-foreground shadow-md ring-1 ring-border transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
        >
            <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="size-4">
                <path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" />
                <path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4Z" />
            </svg>
        </button>

        {{-- Share --}}
        <button
            type="button"
            role="menuitem"
            aria-label="{{ __('Share') }}"
            class="inline-flex size-10 items-center justify-center rounded-full bg-popover text-popover-foreground shadow-md ring-1 ring-border transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
        >
            <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="size-4">
                <circle cx="18" cy="5" r="3" />
                <circle cx="6" cy="12" r="3" />
                <circle cx="18" cy="19" r="3" />
                <line x1="8.59" y1="13.51" x2="15.42" y2="17.49" />
                <line x1="15.41" y1="6.51" x2="8.59" y2="10.49" />
            </svg>
        </button>

        {{-- Delete --}}
        <button
            type="button"
            role="menuitem"
            aria-label="{{ __('Delete') }}"
            class="inline-flex size-10 items-center justify-center rounded-full bg-popover text-popover-foreground shadow-md ring-1 ring-border transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
        >
            <svg aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="size-4">
                <polyline points="3 6 5 6 21 6" />
                <path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" />
                <path d="M10 11v6M14 11v6" />
                <path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2" />
            </svg>
        </button>
    </x-ui.speed-dial>
</div>

Accessibility & localization

WCAG 2.2 AA RTL-ready data-slot Keyboard focus-visible Localized labels
  • Accessibility target: wcag-2.2-aa-target.
  • Uses semantic HTML and a stable data-slot attribute for styling/scripting hooks.
  • Focus-visible rings use the ring token so keyboard focus is always visible.
  • Disabled and invalid states are conveyed to assistive tech, not by color alone.
  • Targets WCAG 2.2 AA; verify contrast in light, dark, admin and customer surfaces above.
  • Labels go through __() and the component uses logical properties (ms-*, text-start, start-*) so it mirrors correctly — flip the preview to RTL to confirm.

Source

The exact, editable file ui:add writes into your app — copy it or own the whole thing. Previews render this same code; there are no preview-only components.

Changelog

Current version: v1.0.0. See the site changelog for the full release history.