Overview
tng-slide-toggle is an on/off toggle that implements ControlValueAccessor. Value is boolean. Optional label; klass hooks for root, label, and track/thumb with base + on/off state (trackOnKlass, trackOffKlass, thumbOnKlass, thumbOffKlass).
Quick example
Basic
<form [formGroup]="form">
<tng-slide-toggle formControlName="enabled" label="Enable feature" />
</form>
form = new FormGroup({
enabled: new FormControl(false, { nonNullable: true }),
});
Value: false
Features
Value: boolean
Form value is true or false.
Klass hooks (base + on/off)
rootKlass, labelKlass, inputKlass; base trackKlass/thumbKlass; per-state trackOnKlass, trackOffKlass, thumbOnKlass, thumbOffKlass.