Search results

Enable Ripple for Switch Label

By default, label with ripple effect is not available in Switch. You can achieve this using IJSRuntime method. The following example illustrates how to enable ripple effect for labels in Switch component.

@using Syncfusion.EJ2.Blazor.Buttons

<EjsSwitch>Bluetooth</EjsSwitch>

@code {
    [Inject]
    private IJSRuntime jsRuntime { get; set; }

    protected override void OnAfterRender()
    {
        this.jsRuntime.Ejs().EnableRipple(true);
    }
}

Output be like

Switch Sample