Empty overview
Headless empty gives you only structural slots. The primitive does not add behavior, ARIA, or layout rules beyond stable data-slot hooks on each part.
Imports
Bring in the root plus any parts you want to render. Omit parts you do not need.
Headless empty imports
ts
import {
TngEmpty,
TngEmptyActions,
TngEmptyDescription,
TngEmptyIcon,
TngEmptyTitle,
} from '@tailng-ui/primitives';
Basic composition
The root and parts are purely structural. Your own markup, CSS, and surrounding semantics define how the empty state is announced and displayed.
Headless empty composition
html
<section tngEmpty class="report-empty" [attr.data-align]="'start'">
<div tngEmptyIcon>📭</div>
<h3 tngEmptyTitle>No reports yet</h3>
<p tngEmptyDescription>Create your first report to start tracking delivery health.</p>
<div tngEmptyActions>
<button type="button">Create report</button>
</div>
</section>
Style variants
The same structural slots skinned with owner-authored CSS or Tailwind utilities.
Headless empty with owner CSS
No invoices yet
Generate your first invoice to start tracking billing workflows.
Headless empty with Tailwind
🗂️
Nothing in this board
Add your first card to begin planning this sprint.
Structural baseline
- There is no interaction logic or keyboard behavior in the primitive.
- Every directive only reflects a stable
data-slotvalue. - Use your surrounding section, landmark, or heading structure to give the empty state meaning.
- When you want a default shell with
alignhandling, use the component wrapper.