Skip to main content
Neural UIv2.0.0Documentation
View v1 GitHub

SpeedDial

Reveal a compact set of quick actions from a floating trigger.

Category
Actions
Import
@neural-ui/core/speed-dial
Selector
neu-speed-dial
import { NeuSpeedDialComponent } from '@neural-ui/core/speed-dial';

Usage

items defines stable action keys and labels. Bind open and accept openChange for controlled visibility; null enables local open state. direction and type choose the arrangement, radius is the radial distance, and mask optionally adds a backdrop. Reserve enough space around the trigger. Item and trigger Templates supply visual content while Core keeps accessible names and wrappers.

Examples

Try this application-owned interaction. Its event handling and initial data are included in Code.

Examples

Events: 0

Try and configure

Change the public options, try the result and inspect the updated template. Code contains the complete executable implementation.

Try and configure

Events: 0

template.html
<div class="remaining-speed-stage">
  <neu-speed-dial
    [items]="items()"
    [open]="open()"
    (openChange)="open.set($event)"
    [disabled]="false"
    [direction]="'up'"
    [type]="'linear'"
    [radius]="64"
    [mask]="false"
    [hideOnClickOutside]="true"
    [ariaLabel]="'Quick actions'"
    (itemActivate)="record('itemActivate', $event.item.key)"
  ></neu-speed-dial>
</div>

State and events

items defines stable action keys and labels. Bind open and accept openChange for controlled visibility; null enables local open state. direction and type choose the arrangement, radius is the radial distance, and mask optionally adds a backdrop. Reserve enough space around the trigger. Item and trigger Templates supply visual content while Core keeps accessible names and wrappers.

Accessibility and keyboard

Enter/Space opens the trigger. Arrow keys move through enabled actions; Escape closes and returns focus to the trigger.

Key
Action
Tab Reach the trigger and available native actions.
Enter Open the action menu from its trigger or activate the focused enabled action.
Space Open the action menu from its trigger or activate the focused enabled action.
Arrow keys Move focus among available menu actions according to its orientation.
Home Focus the first available menu action.
End Focus the last available menu action.
Escape Close the action menu and return focus to the trigger.

API

Inputs, models and Outputs are extracted from the installed Core package. Named public types link to their definitions. Templates below include executable examples.

Inputs

Configure the component with [property]="value". Your application supplies these values; the component does not replace the state you pass in.

Name
Type
Default
Template binding
Description
animationReadonly<NeuSpeedDialAnimationConfig>{}[animation]Optional per-item delay and trigger rotation settings.
ariaDescribedBystring | nullnull[ariaDescribedBy]IDs of elements describing the control, separated by spaces.
ariaLabelstring | null'Quick actions'[ariaLabel]Accessible name of the control or region.
ariaLabelledBystring | nullnull[ariaLabelledBy]IDs of existing elements naming this control or region.
directionNeuSpeedDialDirection'up'[direction]Direction in which quick actions unfold: up, down, left or right.
disabledbooleanfalse[disabled]Prevents interaction with this control.
hideOnClickOutsidebooleantrue[hideOnClickOutside]Close the quick-action list when the user clicks outside.
idstring | undefinedNo default[id]Optional stable host id. Keep ids unique when displaying several menus.
itemsreadonly NeuSpeedDialItem[][][items]Applied item collection. Stable keys and accessors identify entries; the component does not mutate the array.
maskbooleanfalse[mask]Shows a backdrop behind the expanded quick-action menu.
openboolean | nullnull[open]Applied open state; null enables local visibility. Accept openChange for controlled changes.
radiusnumber80[radius]Distance in pixels used by radial quick-action layouts.
tabindexnumber0[tabindex]Tab order of the quick-action trigger.
tooltipReadonly<NeuSpeedDialTooltipConfig> | nullnull[tooltip]Optional tooltip configuration; item labels remain the accessible names.
typeNeuSpeedDialType'linear'[type]Action layout: linear, circle, semi-circle or quarter-circle.

Outputs

Listen to an event with (event)="handler($event)". The table explains the data your handler receives and how to use it.

Name
Payload
Template binding
Description
closedNeuSpeedDialVisibilityEvent(closed)="onClosed($event)"Reports closure of this component. Consult the payload type for the emitted data.
itemActivateNeuSpeedDialItemEvent(itemActivate)="onItemActivate($event)"Reports the quick action and original event after activation.
openChangeboolean(openChange)="onOpenChange($event)"Proposes the next visibility state. Apply it to open when using controlled visibility.
openedNeuSpeedDialVisibilityEvent(opened)="onOpened($event)"Reports opening of this component. Consult the payload type for the emitted data.
triggerClickMouseEvent(triggerClick)="onTriggerClick($event)"Reports the native click on the quick-action trigger.

Templates

ng-content projects content into the component. TemplateRef inputs receive a template; ng-template directives identify templates with a typed context. A directive shared by an entrypoint is not necessarily a slot of this component.

Name
Mechanism
Contract
NeuSpeedDialItemDirectiveView example Public template directive (entrypoint)ng-template[neuSpeedDialItem]
NeuSpeedDialTriggerDirectiveView example Public template directive (entrypoint)ng-template[neuSpeedDialTrigger]

Each example demonstrates a different template. Switch between Demo and Code to inspect its implementation, imports and state.

NeuSpeedDialItemDirective

NeuSpeedDialItemDirective

NeuSpeedDialItemDirective

Events: 0

NeuSpeedDialTriggerDirective

NeuSpeedDialTriggerDirective

NeuSpeedDialTriggerDirective

Events: 0

Public methods

Name
Contract
closeclose(): void;
openopen(): void;
toggletoggle(): void;

Public Types

Open a type to inspect its definition and interface fields.

Styles and tokens

Use the supported public tokens listed below. Surrounding layout belongs to your application; validate the result in light and dark modes and narrow containers.

Specific tokens

This component uses shared theme tokens rather than dedicated component hooks.

Shared tokens used

Override these on a local wrapper to affect this example. An override on :root affects other components that use the same token.

Token
Purpose here
Other impact
Default / fallback
--neu-border Normal control and cell borders Shared by other Core consumers; scope the override. rgba(15, 23, 42, 0.08)
--neu-primary Brand color for active controls and emphasis Shared by other Core consumers; scope the override. #007aff
--neu-primary-dark Dark brand shade; outline and ghost Button text in the light theme Shared by other Core consumers; scope the override. #005fcc
--neu-primary-fg Foreground drawn over the primary background Shared by other Core consumers; scope the override. #ffffff
--neu-primary-solid Solid brand action background Shared by other Core consumers; scope the override. #006ee6
--neu-primary-solid-fg Foreground of solid brand actions Shared by other Core consumers; scope the override. #ffffff
--neu-primary-solid-hover Hover background of solid brand actions Shared by other Core consumers; scope the override. #005fcc
--neu-surface Main field, header or control surface Shared by other Core consumers; scope the override. #ffffff