@page "/buttons" @page "/button"

Button with text

OnClick("Button with text")) Text="Buttonx" Style="margin-bottom: 20px; width: 150px" />

Button with text and icon

OnClick("Button with text and icon")) Text="Button" Icon="account_circle" Style="margin-bottom: 20px; width: 150px" />

Button with icon

OnClick("Button with icon")) Icon="account_circle" Style="margin-bottom: 20px; width: 80px" />

Button with image

OnClick("Button with image")) Image="images/radzen-nuget.png" ButtonStyle="ButtonStyle.Light" Style="margin-bottom: 20px; width: 80px" />

Button with content

OnClick("Button with content")) Image="images/radzen-nuget.png" ButtonStyle="ButtonStyle.Light" Style="margin-bottom: 20px; width: 200px"> Some text

Disabled Button

Button styles

OnClick("Primary button")) Text="Primary" ButtonStyle="ButtonStyle.Primary" /> OnClick("Secondary button")) Text="Secondary" ButtonStyle="ButtonStyle.Secondary" /> OnClick("Light button")) Text="Light" ButtonStyle="ButtonStyle.Light" /> OnClick("Danger button")) Text="Danger" ButtonStyle="ButtonStyle.Danger" /> OnClick("Info button")) Text="Info" ButtonStyle="ButtonStyle.Info" /> OnClick("Warning button ")) Text="Warning" ButtonStyle="ButtonStyle.Warning" />

Busy Indicator

Without BusyText
With Busy Text
@code { bool busy; void OnClick(string buttonName) { } async Task OnBusyClick() { busy = true; await Task.Delay(2000); busy = false; } }