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

PropTypeDefaultDescription
size"default" | "lg" | "sm"'default'Track and thumb size.
iconOnstring''Optional SVG path `d` shown inside the thumb when checked.
iconOffstring''Optional SVG path `d` shown inside the thumb when unchecked.

Two-way models

Bind with [(name)], or one-way as an input.

PropTypeDefaultDescription
checkedbooleanfalseWhether the switch is on. Two-way bindable with `[(checked)]`.
disabledbooleanfalseWhether 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.