Enabled switch
import { Label, Switch } from "@combric/react";
export function Example() {
return <Label><Switch defaultChecked /> Notifications</Label>;
}Form-associated native checkbox presented as an on/off switch.
@combric/react · v1.1.1 · Current
import { Switch } from "@combric/react";Load the native stylesheet with @import "@combric/react/css";. This path does not require Tailwind.
import { Label, Switch } from "@combric/react";
export function Example() {
return <Label><Switch defaultChecked /> Notifications</Label>;
}import { Label, Switch } from "@combric/react";
export function Example() {
return <Label><Switch /> Notifications</Label>;
}import { Label, Switch } from "@combric/react";
export function Example() {
return <Label><Switch defaultChecked disabled /> Notifications are on</Label>;
}| Name |
|---|
Switch |
| Property / capability | Published contract |
|---|---|
| Contract | Native checkbox props |
| Contract | checked/defaultChecked |
| Contract | role is switch |
Requires a label and retains native form participation; use Checkbox for ordinary form choices.
Native Space toggling.
Combric classes and canonical --combric-* variables provide the package presentation. Consumer className extends the required class; it does not replace the component contract.