Switch

Playground

Properties

Size
Checked
Disabled

Usage

Use Switch for an on/off setting that takes effect immediately. Control it with checked and onCheckedChange.

'use client';
import { Switch } from '@mbsw/ui';

export default function Example() {
  return (
    <label>
      <Switch defaultChecked={false} /> {"Enable"}
    </label>
  );
}

The Playground Code tab includes the full example with your current settings. See Installation for the CSS imports.

Composition