Overview

tng-checkbox is a standalone checkbox that implements ControlValueAccessor for Angular forms. It supports an optional label, disabled, required, and slot-based styling for the root label, input, and label text.

CVA label slot: container, input, label Standalone
Reactive Forms

Quick example

Basic
HTMLTSCSS

<form [formGroup]="form">
  <tng-checkbox formControlName="terms" label="I agree to the terms" />
  <tng-checkbox formControlName="newsletter" label="Subscribe to newsletter" />
</form>

Value: { "terms": false, "newsletter": false }

Features

Value: boolean

Form value is true or false.

Slot hooks

slot keys: container (label), input, label.

Forms-ready

Works with formControlName and validators (e.g. Validators.requiredTrue).