Saltar al contenido

SpeedDial API

API documentation for the React SpeedDial component. Learn about the available props, and the CSS API.

Import

import SpeedDial from '@material-ui/core/SpeedDial';
// o
import { SpeedDial } from '@material-ui/core';
You can learn about the difference by reading this guide on minimizing bundle size.

Component name

The name MuiSpeedDial can be used when providing default props or style overrides in the theme.

Props

NombreTipoPor defectoDescripción
ariaLabel*stringThe aria-label of the button element. Also used to provide the id for the SpeedDial element and its children.
childrennodeSpeedDialActions to display when the SpeedDial is open.
classesobjectOverride or extend the styles applied to the component. See CSS API below for more details.
direction'down'
| 'left'
| 'right'
| 'up'
'up'The direction the actions open relative to the floating action button.
FabPropsobject{}Props applied to the Fab element.
hiddenboolfalseIf true, the SpeedDial is hidden.
iconnodeThe icon to display in the SpeedDial Fab. The SpeedDialIcon component provides a default Icon with animation.
onClosefuncCallback fired when the component requests to be closed.

Signature:
function(event: object, reason: string) => void
event: The event source of the callback.
reason: Can be: "toggle", "blur", "mouseLeave", "escapeKeyDown".
onOpenfuncCallback fired when the component requests to be open.

Signature:
function(event: object, reason: string) => void
event: The event source of the callback.
reason: Can be: "toggle", "focus", "mouseEnter".
openboolfalseControl the popup` open state.
openIconnodeThe icon to display in the SpeedDial Fab when the SpeedDial is open.
sxobject
TransitionComponentelementTypeZoomThe component used for the transition. Follow this guide to learn more about the requirements for this component.
transitionDurationnumber
| { appear?: 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.
TransitionPropsobjectProps applied to the transition element. By default, the element is based on this Transition component.

The ref is forwarded to the root element.
Any other props supplied will be provided to the root element (native element).

CSS

Rule nameGlobal classDescripción
root.MuiSpeedDial-rootStyles applied to the root element.
fab.MuiSpeedDial-fabStyles applied to the Fab component.
directionUp.MuiSpeedDial-directionUpStyles applied to the root element if direction="up"
directionDown.MuiSpeedDial-directionDownStyles applied to the root element if direction="down"
directionLeft.MuiSpeedDial-directionLeftStyles applied to the root element if direction="left"
directionRight.MuiSpeedDial-directionRightStyles applied to the root element if direction="right"
actions.MuiSpeedDial-actionsStyles applied to the actions (`children` wrapper) element.
actionsClosed.MuiSpeedDial-actionsClosedStyles applied to the actions (`children` wrapper) element if open={false}.

You can override the style of the component using one of these customization options:

Demos