Separator overview
Headless separator is a minimal divider primitive. It gives you a stable slot selector, orientation hook, and semantic toggle without imposing extra container structure.
Imports
Import the directive anywhere you need horizontal or vertical dividers in owner-authored layouts.
Headless separator import
ts
import { TngSeparator } from '@tailng-ui/primitives';
Basic composition
Apply the directive to any block element that should render as a divider. Toggle [decorative] only when the separation carries meaning for assistive technology.
Headless separator usage
html
<section class="toolbar">
<span>Profile</span>
<div tngSeparator orientation="vertical"></div>
<span>Security</span>
</section>
<div tngSeparator [decorative]="false"></div>
Style variants
The same primitive divider contract rendered through local CSS or a Tailwind utility shell.
Headless separator overview (plain CSS)
ProfileSecurityBilling
Use semantic separators only when the break carries meaning.
Headless separator overview (Tailwind CSS)
DeploymentsEnvironmentsAudit trail
Tailwind handles shell spacing while the primitive keeps divider semantics stable.
Accessibility baseline
- Keep
decorativetrue for purely visual dividers. - Set
[decorative]="false"only when the separator carries structural meaning. - Use
orientation="vertical"only when the divider is visually vertical.