Overview
tng-slide-toggle is an on/off toggle that implements ControlValueAccessor. Value is boolean. Optional label; slot-based micro styling for container, label, input, track, thumb with per-state trackChecked, trackUnchecked, thumbChecked, thumbUnchecked.
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.
Slot-based micro styling
slot: container, label, input, track, thumb; per-state trackChecked, trackUnchecked, thumbChecked, thumbUnchecked.