Class SpeedDialItem
Represents an action item for the SfSpeedDial component, enabling the inclusion of icon, text, or both in a SpeedDial action item.
Inheritance
Namespace: Syncfusion.Blazor.Buttons
Assembly: Syncfusion.Blazor.dll
Syntax
public class SpeedDialItem : OwningComponentBase
Remarks
You can render a SpeedDial action item as icon-only, text-only, or with both icon and text based on the property values set for each item. This flexibility allows you to customize the visual appearance and behavior of action items in the SfSpeedDial component to best suit your application's requirements.
Examples
The following example demonstrates how to define basic SpeedDial items using the SpeedDialItem tag directive:
<SfSpeedDial Content="Edit">
<SpeedDialItems>
<SpeedDialItem Text="Cut" IconCss="e-icons e-cut"></SpeedDialItem>
<SpeedDialItem IconCss="e-icons e-copy"></SpeedDialItem>
<SpeedDialItem Text="Paste"></SpeedDialItem>
</SpeedDialItems>
</SfSpeedDial>
Constructors
SpeedDialItem()
Declaration
public SpeedDialItem()
Properties
Disabled
Gets or sets a value indicating whether the SpeedDialItem is disabled.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
When this property is set to true
, the SpeedDial action item will appear and behave as disabled, preventing user interaction.
Examples
<SpeedDialItem Text="Cut" Disabled="true" />
HtmlAttributes
Gets or sets a collection of additional HTML attributes that are applied to the SpeedDial item element.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.Object> | A System.Collections.Generic.Dictionary<, > representing additional attributes, where TKey is string and TValue is object. The default value is |
Remarks
Additional attributes can be applied either as inline attributes or using the @attributes
directive for custom styling or data attributes.
Examples
The below code demonstrates adding a style attribute to the SpeedDialItem using inline notation:
<SfSpeedDial Content="Edit">
<SpeedDialItems>
<SpeedDialItem Text="Cut" IconCss="e-icons e-cut" style="color:red;"></SpeedDialItem>
</SpeedDialItems>
</SfSpeedDial>
IconCss
Gets or sets one or more CSS classes to include an icon or image in the SpeedDial item.
Declaration
public string IconCss { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
Setting this property will display an icon or image along with or instead of text in the SpeedDial action item.
Examples
<SpeedDialItem IconCss="e-icons e-copy" />
ID
Gets or sets a unique identifier for the SpeedDialItem used in event arguments.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
Assign a unique value to distinguish between items when handling events.
Examples
<SpeedDialItem Text="Paste" ID="paste-item" />
Text
Gets or sets the textual content of the SpeedDialItem.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
The text will not be displayed when Mode is Radial
.
In Linear
mode, text will not be displayed if Direction is Left
or Right
.
Examples
<SpeedDialItem Text="Cut" />
Title
Gets or sets the tooltip content (title) for the SpeedDialItem.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
Tooltip is displayed when hovering over the SpeedDial action item for additional context.
Examples
<SpeedDialItem Text="Copy" Title="Copy the content" />
Methods
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
OnInitializedAsync()
Declaration
protected override Task OnInitializedAsync()
Returns
Type |
---|
System.Threading.Tasks.Task |