New to Telerik UI for Blazor? Download free 30-day trial

ButtonGroup Buttons

The ButtonGroup component supports two types of buttons that have different behavior:

You can add the desired button instances by declaring the dedicated button tags. Additionally, you can individually confire their appearance, enabled/disabled state and visibility through the paramaters each button tag exposes.

ButtonGroup ToggleButton

The ButtonGroupToggleButton becomes selected when clicked and de-selects when another one is clicked. If multiple selection is enabled, the user can select more than one ButtonGroupToggleButton at a time. Clicking on a selected button in this case will de-select it. Read more in the Selection article.

The ButtonGroupToggleButton inherits the parameters and behavior of the TelerikToggleButton component.

ButtonGroup Button

The ButtonGroupButton does not change its visual state when clicked. It behaves as a regular button and does not support selection.

The ButtonGroupButton iherits the parameters and behavior of the TelerikButton component.

Disabled State

To disable a button, set its Enabled attribute to false.

Disabled buttons in a ButtonGroup

    <ButtonGroupButton Enabled="false">Disabled</ButtonGroupButton>
    <ButtonGroupToggleButton Selected="true">Enabled</ButtonGroupToggleButton>
    <ButtonGroupToggleButton Enabled="false">Disabled</ButtonGroupToggleButton>


You can set the Visible parameter of individual buttons to false to hide them based on certain logic. This lets you maintain the same markup and toggle features on and off with simple flags without affecting indexes and event handlers.

Hide buttons from a ButtonGroup

    <ButtonGroupButton Visible="false">Hidden</ButtonGroupButton>
    <ButtonGroupToggleButton Visible="false">Fourth</ButtonGroupToggleButton>

See Also

In this article