Switch
Toggle animado compatible con Angular Forms. Ideal para activar/desactivar opciones.
TypeScript
import { NeuSwitchComponent } from '@neural-ui/core/switch';TypeScript
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { NeuSwitchComponent } from '@neural-ui/core/switch';
@Component({
imports: [NeuSwitchComponent, ReactiveFormsModule],
template: `
<neu-switch label="Notificaciones" [formControl]="notifCtrl" />
<neu-switch label="Modo oscuro" [disabled]="true" />
<!-- Reactive Forms / Reactive Forms -->
<neu-switch label="Newsletter" [formControl]="newsletterCtrl" />
`
})
export class MyComponent {
readonly notifCtrl = new FormControl(false, { nonNullable: true });
readonly newsletterCtrl = new FormControl(false, { nonNullable: true });
}