Button
SpeedDial
A floating button that fans its actions out, in a line or around a circle.
WAI-ARIA tested
Import
main.ts
import { SpeedDial } from '@vitral/vue';Linear
Circle and semi-circle
Quarter circle
API
Read from packages/vue/src/components/SpeedDial/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| model | MenuItem[] | The actions; each item's `label` names its button and shows as a tooltip. |
| direction | SpeedDialDirection | Where the actions open. Defaults to `'up'`. |
| type | 'linear' | 'circle' | 'semi-circle' | 'quarter-circle' | A line (the default), or around a circle, a half or a quarter of one. |
| radius | number | The circle's radius in pixels. Defaults to 20 per action. |
| showIcon | IconProp | The button's icon while closed. Defaults to a plus. |
| hideIcon | IconProp | The button's icon while open. Without one, the show icon turns. |
| rotateAnimation | boolean | Turn the icon as it opens. Defaults to true. |
| mask | boolean | Dim the page behind the open actions. |
| transitionDelay | number | Milliseconds between one action appearing and the next. Defaults to 30. |
| hideOnClickOutside | boolean | Close on a press outside. Defaults to true. |
| ariaLabel | string | Names the button. |
| severity | Severity | — |
| disabled | boolean | — |
| tooltipPlacement | 'top' | 'bottom' | 'left' | 'right' | Where the action tooltips appear. Defaults to the side away from the direction. |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| show | — | — |
| hide | — | — |
| click | event: MouseEvent | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| item | (props: { item: MenuItem; index: number }) | An action's content. |
| icon | (props: { visible: boolean }) | The button's icon. |