ClassButtonBase
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
ButtonBase()
Declaration
public ButtonBase()
Properties
AriaControls
Sets the HTML aria-controls attribute for the button element. Example: "settings-panel" or "user-menu".
Declaration
[Parameter]
public string AriaControls { get; set; }
Property Value
AriaDescribedBy
Sets the HTML aria-describedby attribute for the button element. Example: "save-help-text validation-message".
Declaration
[Parameter]
public string AriaDescribedBy { get; set; }
Property Value
AriaLabel
Sets the HTML aria-label attribute for the button element. Example: "Save document" or "Close dialog".
Declaration
[Parameter]
public string AriaLabel { get; set; }
Property Value
AriaLabelledBy
Sets the HTML aria-labelledby attribute for the button element.
Declaration
[Parameter]
public string AriaLabelledBy { get; set; }
Property Value
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
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
Enabled
FillMode
Controls the button's visual density and background treatment. Default value is Solid.
Declaration
[Parameter]
public string FillMode { get; set; }
Property Value
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.
Id
Sets the unique HTML id attribute for the button element. Useful for CSS targeting and JavaScript selection. Example: "submitButton".
Declaration
[Parameter]
public virtual string Id { get; set; }
Property Value
Rounded
Controls the border radius and corner styling of the button. Default value is Medium.
Declaration
[Parameter]
public virtual string Rounded { get; set; }
Property Value
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.
TabIndex
ThemeColor
Sets the button's color scheme based on semantic meaning and visual hierarchy. Default value is Base.
Declaration
[Parameter]
public virtual string ThemeColor { get; set; }
Property Value
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.