Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxButtonBase.IconCssClass Property

Specifies the icon’s CSS class.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[DefaultValue(null)]
[Parameter]
public string IconCssClass { get; set; }

#Property Value

Type Default Description
String null

The icon’s CSS class string.

#Remarks

To use an icon within a button component, connect an icon library to your project and assign the CSS class of the icon to IconCssClass property. Use the IconPosition property to specify the icon’s position.

DevExpress Blazor components support pre-defined icon sets (such as Iconic or Bootstrap-recommended libraries) and custom icon libraries. Refer to the following topic for more information: Icons.

<DxButton RenderStyle="ButtonRenderStyle.Dark" Text="Undo" Title="Undo the last action." 
    IconCssClass="undo" style="margin-right: 0.5em;"/>
<DxButton RenderStyle="ButtonRenderStyle.Dark" Text="Redo" Title="Restore the previously undone action." 
    IconCssClass="redo" IconPosition="ButtonIconPosition.AfterText" />

Button Icons

Leave the Text property empty to show an icon without text.

Run Demo: Button — Icons

See Also