Set the Disabled State in Blazor Button Component

26 Dec 20231 minute to read

Button component can be enabled/disabled by giving Disabled property. To disable Button component, the Disabled property can be set as true.

The following example demonstrates Button in Disabled state.

@using Syncfusion.Blazor.Buttons

<SfButton Disabled="@disable" @ref="ButtonObj">Disabled</SfButton>
<SfButton OnClick="click">Enable</SfButton>

@code{
    SfButton ButtonObj;
    private Boolean disable = true;
    public void click()
    {
        disable = false;
    }
}

Disable State in Blazor Button