Search results

SpeedDialComponent

Represents the Angular SpeedDial Component.

<button ejs-speeddial content='Edit'></button>

Properties

animation

SpeedDialAnimationSettingsModel

Provides options to customize the animation applied while opening and closing the popup of speed dial

    <button ejs-speeddial id="speeddial" openIconCss='e-icons e-menu' [items]='items' [animation]='animation'></button>
import { Component, ViewEncapsulation } from '@angular/core';
import { SpeedDialItemModel,SpeedDialAnimationSettingsModel } from '@syncfusion/ej2-angular-buttons';
/**
 * Default Speed Dial component
 */
@Component({
    selector: 'app-root',
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.css'],
    encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public items: SpeedDialItemModel[] = [
      { text: 'Cut', iconCss: 'e-icons e-cut' },
      { text: 'Copy', iconCss: 'e-icons e-copy' },
      { text: 'Paste', iconCss: 'e-icons e-paste' }
    ];
    public animation: SpeedDialAnimationSettingsModel = { effect: 'Zoom' };
}

Defaults to { effect: ‘Fade’, duration: 400, delay: 0 }

closeIconCss

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

content

string

Defines the content for the button of SpeedDial.

Defaults to

cssClass

string

Defines one or more CSS classes to customize the appearance of SpeedDial.

Defaults to

direction

string | LinearDirection

Defines the speed dial item display direction when mode is linear . The possible values are

  • Up
  • Down
  • Left
  • Right
  • Auto

Defaults to LinearDirection.Auto

disabled

boolean

Defines whether to enable or disable the SpeedDial.

Defaults to false.

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

Defaults to false

enableRtl

boolean

Enable or disable rendering component in right to left direction.

Defaults to false

iconPosition

string | IconPosition

Defines the position of icon in the button of speed dial. The possible values are:

  • Left
  • Right

Defaults to IconPosition.Left

isPrimary

boolean

Specifies whether the SpeedDial acts as the primary.

Defaults to true

itemTemplate

string | object

Defines the template content for the speed dial item.

    <button ejs-speeddial id="speeddial" openIconCss='e-icons e-menu' [items]='items' [itemTemplate]="itemTemplate">
        <ng-template #itemTemplate let-items="">
            <div class="itemlist">
                <span class="icon {{items.iconCss}}" style="padding:3px"></span>
                <span class="text">{{items.text}}</span>
            </div>
    </ng-template>
    </button>
import { Component, ViewEncapsulation } from '@angular/core';
import { SpeedDialItemModel } from '@syncfusion/ej2-angular-buttons';
/**
 * Default Speed Dial component
 */
@Component({
    selector: 'app-root',
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.css'],
    encapsulation: ViewEncapsulation.None
})
export class AppComponent {
     public items: SpeedDialItemModel[] = [
    { text:'Cut', iconCss:'e-icons e-cut'},
    { text:'Copy', iconCss:'e-icons e-copy'},
    { text:'Paste', iconCss:'e-icons e-paste'}
  ];
}

Defaults to

items

SpeedDialItemModel[]

Defines the list of SpeedDial items.

Defaults to []

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

Defaults to

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.

mode

string | SpeedDialMode

Defines the display mode of speed dial action items. The possible values are:

  • Linear
  • Radial
   <button ejs-speeddial id="speeddial" openIconCss='e-icons e-menu' [items]='items' mode='Radial'></button>
import { Component, ViewEncapsulation } from '@angular/core';
import { SpeedDialItemModel } from '@syncfusion/ej2-angular-buttons';
/**
 * Default Speed Dial component
 */
@Component({
    selector: 'app-root',
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.css'],
    encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public items: SpeedDialItemModel[] = [
      { iconCss: 'e-icons e-cut' },
      { iconCss: 'e-icons e-copy' },
      { iconCss: 'e-icons e-paste' }
    ];
}

Defaults to SpeedDialMode.Linear

openIconCss

string

Defines one or more CSS classes to include an icon or image for the button of SpeedDial when it’s closed.

Defaults to

opensOnHover

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

popupTemplate

string | object

Defines a template content for popup of SpeedDial.

Defaults to

position

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:

  • TopLeft: Positions the FAB at the target’s top left corner.
  • TopCenter: Positions the FAB at the target’s top left corner.
  • TopRight: Positions the FAB at the target’s top left corner.
  • MiddleLeft: Positions the FAB at the target’s top left corner.
  • MiddleCenter: Positions the FAB at the target’s top left corner.
  • MiddleRight: Positions the FAB at the target’s top left corner.
  • BottomLeft: Positions the FAB at the target’s top left corner.
  • BottomCenter: Places the FAB on the bottom-center position of the target.
  • BottomRight: Positions the FAB at the target’s bottom right corner. To refresh the position of FAB on target resize, use refreshPosition method. The position will be refreshed automatically when browser resized.

Defaults to FabPosition.BottomRight

radialSettings

RadialSettingsModel

Provides the options to customize the speed dial action buttons when mode of speed dial is radial

   <button ejs-speeddial id="speeddial" openIconCss='e-icons e-menu' [items]='items' mode='Radial' [radialSettings]='radialSettings'></button>
import { Component, ViewEncapsulation } from '@angular/core';
import { SpeedDialItemModel,RadialSettingsModel } from '@syncfusion/ej2-angular-buttons';
/**
 * Default Speed Dial component
 */
@Component({
    selector: 'app-root',
    templateUrl: 'app.component.html',
    styleUrls: ['app.component.css'],
    encapsulation: ViewEncapsulation.None
})
export class AppComponent {
    public items: SpeedDialItemModel[] = [
      { iconCss: 'e-icons e-cut' },
      { iconCss: 'e-icons e-copy' },
      { iconCss: 'e-icons e-paste' }
    ];
    public radialSettings: RadialSettingsModel = { offset: '80px', direction: 'AntiClockwise', startAngle: 190, endAngle: 260 };
} 

Defaults to { startAngle: null, endAngle: null, direction: ‘Auto’ }

target

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

visible

boolean

Defines whether the SpeedDial is visible or hidden.

Defaults to true.

Methods

hide

Closes the SpeedDial popup.

Returns void

refreshPosition

Refreshes the button position of speed dial. You can call this method to re-position button when the target is resized.

Returns void

show

Opens the SpeedDial popup to display to display the speed dial items or the popupTemplate.

Returns void

Events

beforeClose

EmitType<SpeedDialBeforeOpenCloseEventArgs>

Event callback that is raised before the speed dial popup is closed.

beforeItemRender

EmitType<SpeedDialItemEventArgs>

Event callback that is raised before rendering the speed dial item.

beforeOpen

EmitType<SpeedDialBeforeOpenCloseEventArgs>

Event callback that is raised before the speed dial popup is opened.

clicked

EmitType<SpeedDialItemEventArgs>

Event callback that is raised when a speed dial action item is clicked.

created

EmitType<Event>

Event callback that is raised after rendering the speed dial.

onClose

EmitType<SpeedDialOpenCloseEventArgs>

Event callback that is raised when the SpeedDial popup is closed.

onOpen

EmitType<SpeedDialOpenCloseEventArgs>

Event callback that is raised when the SpeedDial popup is opened.