The SpeedDial component that appears in front of all the contents of the page and displays list of action buttons on click which is an extended version of FAB. The button of speed dial is positioned in relative to a view port of browser or the . It can display a menu of related actions or a custom content popupTemplate>.
SpeedDialAnimationSettingsModel
Provides options to customize the animation applied while opening and closing the popup of speed dial
<button id='speeddial'></button>
import { SpeedDial, SpeedDialItemModel, SpeedDialAnimationSettings } from '@syncfusion/ej2-buttons';
let items: SpeedDialItemModel[] = [
{ iconCss: 'e-icons e-cut' },
{ iconCss: 'e-icons e-copy' },
{ iconCss: 'e-icons e-paste' }
];
let animationSettings: SpeedDialAnimationSettings = { effect: 'Zoom', duration: 400, delay: 10 };
let speeddial: SpeedDial = new SpeedDial ({
openIconCss: 'e-icons e-edit',
closeIconCss: 'e-icons e-close',
items: items,
animation: animationSettings
});
speeddial.appendTo('#speeddial');
Defaults to { effect: ‘Fade’, duration: 400, delay: 0 }
string
Defines one or more CSS classes to include an icon or image to denote the speed dial is opened and displaying menu items.
Defaults to ”
string
Defines the content for the button of SpeedDial.
Defaults to ”
string
Defines one or more CSS classes to customize the appearance of SpeedDial.
Defaults to ”
string
| LinearDirection
Defines the speed dial item display direction when mode is linear . The possible values are
Defaults to LinearDirection.Auto
boolean
Defines whether to enable or disable the SpeedDial.
Defaults to false.
boolean
Enable or disable persisting component’s state between page reloads.
Defaults to false
boolean
Enable or disable rendering component in right to left direction.
Defaults to false
string
| IconPosition
Defines the position of icon in the button of speed dial. The possible values are:
Defaults to IconPosition.Left
boolean
Specifies whether the SpeedDial acts as the primary.
Defaults to true
string
| Function
Defines the template content for the speed dial item.
<button id='speeddial'></button>
<script type='text/x-jsrender' id='itemTemplate'>
<div class='itemlist'>
<span class='icon ${iconCss}'></span>
<span class='text'>${text}</span>
</div>
</script>
import { SpeedDial, SpeedDialItemModel } from '@syncfusion/ej2-buttons';
let items: SpeedDialItemModel[] = [
{ text:'Cut', iconCss:'e-icons e-cut'},
{ text:'Copy', iconCss:'e-icons e-copy'},
{ text:'Paste', iconCss:'e-icons e-paste'}
];
let speeddial: SpeedDial = new SpeedDial ({
openIconCss:'e-icons e-edit',
itemTemplate: '#itemTemplate',
items:items
});
speeddial.appendTo('#speeddial');
Defaults to ”
Defines the list of SpeedDial items.
Defaults to []
string
Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.
Defaults to ”
boolean
Defines whether the speed dial popup can be displayed as modal or modal less. When enabled, the Speed dial creates an overlay that disables interaction with other elements other than speed dial items. If user clicks anywhere other than speed dial items then popup will get closed.
Defaults to false.
string
| SpeedDialMode
Defines the display mode of speed dial action items. The possible values are:
<button id='speeddial'></button>
import { SpeedDial, SpeedDialItemModel } from '@syncfusion/ej2-buttons';
let items: SpeedDialItemModel[] = [
{ iconCss: 'e-icons e-cut' },
{ iconCss: 'e-icons e-copy' },
{ iconCss: 'e-icons e-paste' }
];
let speeddial: SpeedDial = new SpeedDial ({
openIconCss:'e-icons e-edit',
mode:'Radial',
items: items
});
speeddial.appendTo('#speeddial');
Defaults to SpeedDialMode.Linear
string
Defines one or more CSS classes to include an icon or image for the button of SpeedDial when it’s closed.
Defaults to ”
boolean
Defines whether to open the popup when the button of SpeedDial is hovered. By default, SpeedDial opens popup on click action.
Defaults to false
string
| Function
Defines a template content for popup of SpeedDial.
Defaults to ”
string
| FabPosition
Defines the position of the button of Speed Dial relative to target. Defines the position of the FAB relative to target. The possible values are:
Defaults to FabPosition.BottomRight
Provides the options to customize the speed dial action buttons when mode of speed dial is radial
<button id='speeddial'></button>
import { SpeedDial, SpeedDialItemModel, RadialSettingsModel } from '@syncfusion/ej2-buttons';
let items: SpeedDialItemModel[] = [
{ iconCss: 'e-icons e-cut' },
{ iconCss: 'e-icons e-copy' },
{ iconCss: 'e-icons e-paste' }
];
let radialSettings: RadialSettingsModel = { direction: 'AntiClockwise', offset:'80px', startAngle:190, endAngle:260 };
let speeddial: SpeedDial = new SpeedDial ({
openIconCss:'e-icons e-edit',
mode:'Radial',
position:'MiddleCenter',
radialSettings: radialSettings,
items: items
});
speeddial.appendTo('#speeddial');
Defaults to { startAngle: null, endAngle: null, direction: ‘Auto’ }
string
| HTMLElement
Defines the selector that points to the element in which the button of SpeedDial will be positioned. By default button is positioned based on viewport of browser. The target element must have relative position, else Button will get positioned based on the closest element which has relative position.
Defaults to ”
boolean
Defines whether the SpeedDial is visible or hidden.
Defaults to true.
Adds the handler to the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event |
handler | Function |
Specifies the call to run when the event occurs. |
Returns void
Appends the control within the given HTML element
Parameter | Type | Description |
---|---|---|
selector (optional) | string | HTMLElement |
Target element where control needs to be appended |
Returns void
Adding unload event to persist data when enable persistence true
Returns void
When invoked, applies the pending property changes immediately to the component.
Returns void
Removing unload event to persist data when enable persistence true
Returns void
Returns the persistence data for component
Returns any
Returns the route element of the component
Returns HTMLElement
Handling unload event to persist data when enable persistence true
Returns void
Closes the SpeedDial popup.
Returns void
Applies all the pending property changes and render the component again.
Returns void
Refreshes the button position of speed dial. You can call this method to re-position button when the target is resized.
Returns void
Removes the handler from the given event listener.
Parameter | Type | Description |
---|---|---|
eventName | string |
A String that specifies the name of the event to remove |
handler | Function |
Specifies the function to remove |
Returns void
Opens the SpeedDial popup to display to display the speed dial items or the popupTemplate.
Returns void
Dynamically injects the required modules to the component.
Parameter | Type | Description |
---|---|---|
moduleList | Function[] |
? |
Returns void
EmitType<SpeedDialBeforeOpenCloseEventArgs>
Event callback that is raised before the speed dial popup is closed.
EmitType<SpeedDialItemEventArgs>
Event callback that is raised before rendering the speed dial item.
EmitType<SpeedDialBeforeOpenCloseEventArgs>
Event callback that is raised before the speed dial popup is opened.
EmitType<SpeedDialItemEventArgs>
Event callback that is raised when a speed dial action item is clicked.
EmitType<Event>
Event callback that is raised after rendering the speed dial.
EmitType<SpeedDialOpenCloseEventArgs>
Event callback that is raised when the SpeedDial popup is closed.
EmitType<SpeedDialOpenCloseEventArgs>
Event callback that is raised when the SpeedDial popup is opened.