Class
ButtonBase

Definition

Namespace:Telerik.Blazor.Components.Common

Assembly:Telerik.Blazor.dll

Syntax:

cs-api-definition
public class ButtonBase : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentButtonBase

Derived Classes: ButtonGroupButtonBaseCommandButtonBaseTelerikButtonTelerikFloatingActionButtonTelerikSpeechToTextButtonTelerikToggleButton

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members BaseComponent.ShouldRender()BaseComponent.OnInitializedAsync()BaseComponent.OnAfterRenderAsync(bool)BaseComponent.Dispose()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.BuildRenderTree(RenderTreeBuilder)ComponentBase.OnInitialized()ComponentBase.OnParametersSet()ComponentBase.OnParametersSetAsync()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)ComponentBase.SetParametersAsync(ParameterView)

Constructors

ButtonBase()

Declaration

cs-api-definition
public ButtonBase()

Properties

AriaControls

Sets the HTML aria-controls attribute for the button element. Example: "settings-panel" or "user-menu".

Declaration

cs-api-definition
[Parameter]
public string AriaControls { get; set; }

Property Value

string

AriaDescribedBy

Sets the HTML aria-describedby attribute for the button element. Example: "save-help-text validation-message".

Declaration

cs-api-definition
[Parameter]
public string AriaDescribedBy { get; set; }

Property Value

string

AriaLabel

Sets the HTML aria-label attribute for the button element. Example: "Save document" or "Close dialog".

Declaration

cs-api-definition
[Parameter]
public string AriaLabel { get; set; }

Property Value

string

AriaLabelledBy

Sets the HTML aria-labelledby attribute for the button element.

Declaration

cs-api-definition
[Parameter]
public string AriaLabelledBy { get; set; }

Property Value

string

ChildContent

Defines the content displayed inside the button, such as text, HTML elements, or other components. When combined with an Icon, the content appears next to the icon. If only an icon is provided without content, the button becomes an icon-only button with additional styling. Children: Any content to display inside the button.

Declaration

cs-api-definition
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

RenderFragment

Enabled

Controls whether the button responds to user interaction. The TabIndex automatically becomes -1 when disabled to ensure proper keyboard navigation flow. Default value is true.

Declaration

cs-api-definition
[Parameter]
public bool Enabled { get; set; }

Property Value

bool

FillMode

Controls the button's visual density and background treatment. Default value is Solid.

Declaration

cs-api-definition
[Parameter]
public string FillMode { get; set; }

Property Value

string

Remarks

Solid provides a filled background for primary actions. Outline shows only a border for secondary actions. Flat removes background and border for subtle actions. Link styles the button as a hyperlink.

Icon

Displays an icon inside the button using Telerik's built-in icon library or custom icons. When used without ChildContent, creates an icon-only button with specialized styling. Refer to Icons - Documentation for available icons and implementation details. Example: SvgIcon.Save, FontIcon.Plus, or custom icon objects.

Declaration

cs-api-definition
[Parameter]
public object Icon { get; set; }

Property Value

object

Id

Sets the unique HTML id attribute for the button element. Useful for CSS targeting and JavaScript selection. Example: "submitButton".

Declaration

cs-api-definition
[Parameter]
public virtual string Id { get; set; }

Property Value

string

Rounded

Controls the border radius and corner styling of the button. Default value is Medium.

Declaration

cs-api-definition
[Parameter]
public virtual string Rounded { get; set; }

Property Value

string

Remarks

Small applies minimal rounding for compact layouts. Medium provides moderate rounding for balanced appearance. Large creates more pronounced rounded corners. Full makes circular buttons, ideal for icon-only buttons.

Size

Determines the button's dimensions including padding, font size, and overall scale. Default value is Medium.

Declaration

cs-api-definition
[Parameter]
public string Size { get; set; }

Property Value

string

Remarks

Small creates compact buttons for dense layouts. Medium provides standard sizing for most interfaces. Large offers prominent sizing for important actions.

TabIndex

Sets the keyboard navigation order for the button using the tabindex attribute. When Enabled is false, this automatically becomes -1 regardless of the set value. Default value is 0 (natural tab order).

Declaration

cs-api-definition
[Parameter]
public int TabIndex { get; set; }

Property Value

int

ThemeColor

Sets the button's color scheme based on semantic meaning and visual hierarchy. Default value is Base.

Declaration

cs-api-definition
[Parameter]
public virtual string ThemeColor { get; set; }

Property Value

string

Remarks

Primary highlights the main call-to-action. Secondary indicates important but not primary actions. Success represents positive actions like save or confirm. Warning draws attention to potentially destructive actions. Error clearly marks dangerous operations like delete. Info provides neutral information or help actions. Base offers subtle, low-emphasis styling.

Title

Sets the HTML title attribute which appears as a tooltip when users hover over the button. Example: "Save your changes" or "Delete this item".

Declaration

cs-api-definition
[Parameter]
public string Title { get; set; }

Property Value

string