Speed Dial

SpeedDial is a floating button with a popup menu.

import { SpeedDialModule } from 'primeng/speeddial';

SpeedDial items are defined with the model property based on MenuModel API. Default orientation of the items is linear and direction property is used to define the position of the items related to the button.

<p-speedDial [model]="items" direction="up"></p-speedDial>
<p-speedDial [model]="items" direction="down"></p-speedDial>
<p-speedDial [model]="items" direction="left"></p-speedDial>
<p-speedDial [model]="items" direction="right"></p-speedDial>

Items can be displayed around the button when type is set to circle. Additional radius property defines the radius of the circle.

<p-speedDial [model]="items" type="circle" [radius]="80" buttonClassName="p-button-warning"></p-speedDial>

When type is defined as semi-circle, items are displayed in a half-circle around the button.

<p-speedDial [model]="items" direction="up" [radius]="80" type="semi-circle"></p-speedDial>
<p-speedDial [model]="items" direction="down" [radius]="80" type="semi-circle"></p-speedDial>
<p-speedDial [model]="items" direction="left" [radius]="80" type="semi-circle"></p-speedDial>
<p-speedDial [model]="items" direction="right" [radius]="80" type="semi-circle"></p-speedDial>

When type is defined as quarter-circle, items are displayed in a half-circle around the button.

<p-speedDial [model]="items" radius="120" direction="up-left" type="quarter-circle" buttonClassName="p-button-success"></p-speedDial>
<p-speedDial [model]="items" radius="120" direction="up-right" type="quarter-circle" buttonClassName="p-button-success"></p-speedDial>
<p-speedDial [model]="items" radius="120" direction="down-left" type="quarter-circle" buttonClassName="p-button-success"></p-speedDial>
<p-speedDial [model]="items" radius="120" direction="down-right" type="quarter-circle" buttonClassName="p-button-success"></p-speedDial>

Items display a tooltip on hober when a standalone Tooltip is present with a target that matches the items.

<p-speedDial [model]="leftTooltipItems" className="speeddial-right" direction="up"></p-speedDial>
<p-speedDial [model]="tooltipItems" className="speeddial-left" direction="up"></p-speedDial>

Adding mask property displays a modal layer behind the popup items.

<p-speedDial [model]="items" direction="up" [mask]="true"></p-speedDial>

SpeedDial sample with an outlined button, custom icons and transitionDelay.

<p-speedDial [model]="items" direction="up" transitionDelay="80" showIcon="pi pi-bars" hideIcon="pi pi-times" buttonClassName="p-button-outlined"></p-speedDial>

Following is the list of structural style classes, for theming classes visit theming page.

p-speeddialContainer element.
p-speed-dial-buttonButton element of speeddial.
p-speed-dial-maskMask element of speeddial.
p-speed-dial-listList of the actions.
p-speed-dial-itemEach action item of list.
Accessibility guide documents the specification of this component based on WCAG guidelines, the implementation is in progress.

Screen Reader

SpeedDial component renders a native button element that implicitly includes any passed prop. Text to describe the button can be defined with the aria-labelledby or aria-label props. Addititonally the button includes includes aria-haspopup, aria-expanded for states along with aria-controls to define the relation between the popup and the button.

The popup overlay uses menu role on the list and each action item has a menuitem role with an aria-label as the menuitem label. The id of the menu refers to the aria-controls of the button.

<p-speedDial aria-label="Options"></p-speedDial>

Menu Button Keyboard Support

enterToggles the visibility of the menu.
spaceToggles the visibility of the menu.
down arrowOpens the menu and moves focus to the first item.
up arrowOpens the menu and moves focus to the last item.

Menu Keyboard Support

enterActives the menuitem, closes the menu and sets focus on the menu button.
escapeCloses the menu and sets focus on the menu button.
arrow keysNavigates between the menu items.
homeMoves focus to the first item.
endMoves focus to the last item.