Switch

Previous Next

A control that allows the user to toggle between checked and not checked.

<div class="flex items-center space-x-2">
    <Switch id="airplane-mode" />
    <Label For="airplane-mode">Airplane Mode</Label>
</div>

Installation

Install the switch component using the command or manual steps.

blazor-shadcn add switch

Usage

@using BlazorShadcn.Components.UI
<Switch />

Examples

DescriptionComing soon

Coming Soon

Choice CardComing soon

Coming Soon

DisabledComing soon

Coming Soon

InvalidComing soon

Coming Soon

SizeComing soon

Coming Soon

API Reference

Switch

Prop Type Default
Checkedboolfalse
CheckedChangedEventCallback<bool>-
Disabledboolfalse
Sizedefault | smdefault
Classstring?null