Imports
Styled component imports
ts
import { TngChipsComponent } from '@tailng-ui/components';
import { TngChip, TngChipRemove } from '@tailng-ui/primitives';Basic usage
Wrapper attachment
html
<tng-chips
[values]="selectedTopics()"
(valuesChange)="onSelectedTopicsChange($event)"
[ariaLabel]="'Selected topics'"
>
<div class="topic-chip-row">
@for (topic of selectedTopics(); track topic) {
<span tngChip [tngChipValue]="topic" [tngChipLabel]="topic" class="topic-chip-pill">
<span>{{ topic }}</span>
<button tngChipRemove type="button" class="topic-chip-remove">×</button>
</span>
}
</div>
</tng-chips>Chip variants
The wrapper keeps the root shell and controlled value model while projected primitives still own chip and remove behavior.
Selected topics (Plain-CSS)
Selected topics
Wrapper-first removable chips with a light shell and a controlled value array.
AccessibilityFormsRelease notes
Selected: Accessibility, Forms, Release notes
Selected surfaces (Tailwind CSS)
Selected surfaces
Wrapper-first removable chips with utility-first styling on top of the same projected primitive parts.
RegistryCLIDocs
Selected: Registry, CLI, Docs
Behavior baseline
- The wrapper forwards
ariaLabel,disabled, and the controlledvaluesarray to the primitive root. - Projected
tngChipandtngChipRemovedirectives still own keyboard removal, focus hooks, and remove labels. - Use the wrapper when you want a styled root shell; drop to headless when you need to own the root DOM outright.