Tag overview
The headless tag primitive gives you a compact label contract plus optional removable behavior, but all visual treatment still belongs to the owner.
Imports
Primitive imports
ts
import { TngTag, TngTagClose, TngTagIcon } from '@tailng-ui/primitives';Basic usage
Compose the tag root, an optional icon slot, and the close action only when the tag is removable.
Headless usage
html
<span
tngTag
[tngTagLabel]="status"
[tngTagRemovable]="true"
(tngTagRemoved)="removeStatus()"
>
<span tngTagIcon aria-hidden="true">●</span>
{{ status }}
<button type="button" tngTagClose><span aria-hidden="true">×</span></button>
</span>
Style variants
The same headless tag behavior rendered with Plain-CSS and Tailwind skins.
Headless tags (Plain CSS)
Draft Review Stable
Draft, Review, Stable
Headless tags (Tailwind CSS)
Alpha Beta GA
Alpha, Beta, GA
Accessibility baseline
- Use a real
<button>fortngTagClosewhenever possible. - Set
tngTagLabelso the default remove label stays meaningful. - Keep decorative icons
aria-hiddenunless they communicate state on their own.