Toggle
A binary switch control that toggles between on and off states, with full keyboard support and form integration.
Import
import {FktToggleComponent} from "frakton-ng/toggle";Basic usage
Default toggle in off state with a visible label.
States
All visual states: off, on, disabled off, and disabled on.
@for (variant of variants; track variant.label) {
{{ variant.label }}
} Hidden label
Toggle with the label hidden visually but still accessible to screen readers via aria-label.
Reactive forms
Integration with Angular Reactive Forms via formControl. Uses Validators.requiredTrue to enforce that the toggle must be enabled, with error display and disable toggling.
Signal forms
Integration with the signal-based @angular/forms/signals API via the [formField] binding. Shows required validation and signal-driven disabled state.
Input driven
Manual signal-driven binding using [(value)] and [(touched)] two-way models without a form abstraction. Validation is handled directly in the template.