Introducing PrimeReact v11-alpha 🎉Discover Now
styledButton

SpeedDial

SpeedDial is a floating action button with a popup menu displaying a set of actions.

preview

Usage#

import { SpeedDial } from '@primereact/ui/speeddial';
import { Plus } from '@primeicons/react/plus';
import { Pencil } from '@primeicons/react/pencil';
<SpeedDial.Root>
    <SpeedDial.Trigger>
        <Plus />
    </SpeedDial.Trigger>
    <SpeedDial.List>
        <SpeedDial.Item>
            <SpeedDial.Action>
                <Pencil />
            </SpeedDial.Action>
        </SpeedDial.Item>
    </SpeedDial.List>
</SpeedDial.Root>

Examples#

Basic#

SpeedDial displays related actions from a single trigger button.

basic-demo

Linear#

When type is set to linear (default), items are displayed in a line based on the direction prop. The direction can be up, down, left, or right.

linear-demo

Circle#

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

circle-demo

Semi Circle#

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

semicircle-demo

Quarter Circle#

Setting type as quarter-circle displays the items at one of four corners of a button based on the direction.

quartercircle-demo

Transition Delay#

The transitionDelay property specifies the delay in milliseconds between each action item's appearance animation.

transitiondelay-demo

Template#

SpeedDial supports full customization of the button and action items using render props or custom components.

template-demo

Tooltip#

SpeedDial can be combined with Tooltip component to display labels for action items.

tooltip-demo

Mask#

SpeedDial can be combined with Motion component to display a mask overlay when opened.

mask-demo

API#

Sub-Components#

See Primitive API for SpeedDialRoot, SpeedDialTrigger, SpeedDialList, SpeedDialItem, SpeedDialAction component documentation.

Hooks#

See Headless API for useSpeedDial hook documentation.

Accessibility#

See SpeedDial Primitive for WAI-ARIA compliance details and keyboard support.