Switch
A toggle for an on/off setting.
Airplane mode
Sizes
Colors
With text
Marketing emails
Receive emails about new products and features.
Settings
Two-factor authentication
Activity digest
Product updates
Disabled
With icons
Reactive form
Notifications — value: true
API reference
Inputs
| Prop | Type | Default | Description |
|---|---|---|---|
size | "default" | "lg" | "sm" | 'default' | Track and thumb size. |
iconOn | string | '' | Optional SVG path `d` shown inside the thumb when checked. |
iconOff | string | '' | Optional SVG path `d` shown inside the thumb when unchecked. |
Two-way models
Bind with [(name)], or one-way as an input.
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | false | Whether the switch is on. Two-way bindable with `[(checked)]`. |
disabled | boolean | false | Whether the switch is disabled. Two-way bindable with `[(disabled)]`. |
Every ng-blatui component also accepts a class input to merge extra Tailwind classes onto the host.