Styles in ASP.NET Core SpeedDial Control

25 Sep 20248 minutes to read

This section briefs different ways to style SpeedDial Control.

SpeedDial button

You can customize the icon and text of ASP.NET Core SpeedDial using openIconCss, closeIconCss and content properties.

SpeedDial with Icon

You can use the openIconCss and closeIconCss property to show icons in speed dial button. You can also show tooltip on hover to show additional details to end-user by setting title attribute.

@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" openIconCss="e-icons e-edit" closeIconCss="e-icons e-close">
</ejs-speeddial>

ASP.NET Core SpeedDial with Icon

SpeedDial with Text

You can show text only in SpeedDial button by setting content property without setting icon properties.

@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" content="Edit"></ejs-speeddial>

ASP.NET Core SpeedDial with Text

SpeedDial with Icon and Text

You can show the icon and text of ASP.NET Core Speed Dial Button using openIconCss, closeIconCss and content properties together.

@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" content="Edit" openIconCss="e-icons e-edit" closeIconCss="e-icons e-close">
</ejs-speeddial>

ASP.NET Core SpeedDial with Icon and Text

Disabled

You can enable or disable the Speed Dial Control using disabled property.

@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" disabled=true content="Edit"></ejs-speeddial>

ASP.NET Core SpeedDial Disabled

CssClass

The ASP.NET Core Speed Dial supports the following predefined styles that can be defined using the cssClass property. You can customize by setting the cssClass property with the below defined class.

CssClass Description
e-primary Used to represent a primary action.
e-outline Used to represent an appearance of button with outline.
e-info Used to represent an informative action.
e-success Used to represent a positive action.
e-warning Used to represent an action with caution.
e-danger Used to represent a negative action.
@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" cssClass="e-warning" content="Edit"></ejs-speeddial>

ASP.NET Core SpeedDial with CssClass

Visible

You can set the Speed Dial Control to visible/hidden state using visible property.

@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" visible=false content="Edit"></ejs-speeddial>

Tooltip

You can show tooltip on hover to show additional details to end-user by setting Title property to speed dial items.

@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        Title="Cut",
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        Title="Copy",
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        Title="Paste",
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" content="Edit"></ejs-speeddial>

Opens on hover

You can use opensOnHover property to open actions items on hover itself. By default action items displayed only when clicking the speed dial button.

@using Syncfusion.EJ2.Buttons

@{ 
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<ejs-speeddial id="speeddial" items="items" opensOnHover=true content="Edit"></ejs-speeddial>

ASP.NET Core SpeedDial with Opens on hover

Customized icon

You can use the cssClass property to customize the appearance of the speedDial control in its default primary state. Below example demonstrates the cssClass property usage in speedDial.

@using Syncfusion.EJ2.Buttons;
@{
    List<SpeedDialItem> items = new List<SpeedDialItem>();
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-cut"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-copy"
    });
    items.Add(new SpeedDialItem
    {
        IconCss = "e-icons e-paste"
    });
}

<div id="target" style="min-height:200px; position:relative; width:300px; border:1px solid;">
    <ejs-speeddial id="speeddial" target="#target" items="items" cssClass="custom-css" openIconCss='e-icons e-edit' closeIconCss='e-icons e-close'></ejs-speeddial>
</div>
<style>
    .custom-css .e-btn-icon {
        color: black;
    }
</style>

ASP.NET Core SpeedDial Custom Icon Close

ASP.NET Core SpeedDial Custom Icon Open