DxButton.IconPosition Property

Specifies the icon's CSS class.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

[Parameter]
[DefaultValue(ButtonIconPosition.BeforeText)]
public ButtonIconPosition IconPosition { get; set; }

Property Value

Type Default Description
ButtonIconPosition

BeforeText

The icon's CSS class string.

Remarks

To use an icon within a <DxButton>, 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 Icons for more information.

<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.

NOTE

Online Demo: Button — Icons

See Also