Skip to content

SpeedDial API

The API documentation of the SpeedDial React component. Learn more about the properties and the CSS customization points.

import SpeedDial from '@material-ui/lab/SpeedDial';

Props

Name Type Default Description
ariaLabel * string The aria-label of the Button element. Also used to provide the id for the SpeedDial element and its children.
ButtonProps object {} Properties applied to the Button element.
children * node SpeedDialActions to display when the SpeedDial is open.
classes object Override or extend the styles applied to the component. See CSS API below for more details.
direction enum: 'up' |
 'down' |
 'left' |
 'right'
'up' The direction the actions open relative to the floating action button.
hidden bool false If true, the SpeedDial will be hidden.
icon * element The icon to display in the SpeedDial Floating Action Button. The SpeedDialIcon component provides a default Icon with animation.
onClose func Callback fired when the component requests to be closed.

Signature:
function(event: object, key: string) => void
event: The event source of the callback
key: The key pressed
open * bool If true, the SpeedDial is open.
openIcon node The icon to display in the SpeedDial Floating Action Button when the SpeedDial is open.
TransitionComponent elementType Zoom The component used for the transition.
transitionDuration union: number |
 { enter?: number, exit?: number }
{ enter: duration.enteringScreen, exit: duration.leavingScreen,} The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object.
TransitionProps object Properties applied to the Transition element.

The component cannot hold a ref.

Any other properties supplied will be provided to the root element (native element).

CSS

You can override all the class names injected by Material-UI thanks to the classes prop. This prop accepts the following keys:

Name Description
root Styles applied to the root element.
fab Styles applied to the Button component.
directionUp Styles applied to the root and action container elements when direction="up"
directionDown Styles applied to the root and action container elements when direction="down"
directionLeft Styles applied to the root and action container elements when direction="left"
directionRight Styles applied to the root and action container elements when direction="right"
actions Styles applied to the actions (children wrapper) element.
actionsClosed Styles applied to the actions (children wrapper) element if open={false}.

Have a look at the overriding styles with classes section and the implementation of the component for more detail.

If using the overrides key of the theme, you need to use the following style sheet name: MuiSpeedDial.

Notes

The component can cause issues in StrictMode.

Demos