ButtonBase
Definition
Namespace:Telerik.Blazor.Components.Common
Assembly:Telerik.Blazor.dll
Syntax:
public class ButtonBase : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentButtonBase
Derived Classes:
Implements:
Inherited Members
Constructors
public ButtonBase()
Properties
[Accessibility] Sets the HTML aria-controls attribute for the button element. Example: "settings-panel" or "user-menu".
[Parameter]
public string? AriaControls { get; set; }
[Accessibility] Sets the HTML aria-describedby attribute for the button element. Example: "save-help-text validation-message".
[Parameter]
public string? AriaDescribedBy { get; set; }
[Accessibility] Sets the HTML aria-label attribute for the button element. Example: "Save document" or "Close dialog".
[Parameter]
public string? AriaLabel { get; set; }
[Accessibility] Sets the HTML aria-labelledby attribute for the button element.
[Parameter]
public string? AriaLabelledBy { get; set; }
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.
[Parameter]
public RenderFragment? ChildContent { get; set; }
Controls the button's visual density and background treatment.
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.
[Parameter]
public object? Icon { get; set; }
Sets the unique HTML id attribute for the button element. Useful for CSS targeting and JavaScript selection. Example: "submitButton".
[Parameter]
public virtual string? Id { get; set; }
Controls the border radius and corner styling of the button.
Sets the button's color scheme based on semantic meaning and visual hierarchy.
[Parameter]
public virtual string? ThemeColor { get; set; }
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.