Install
Pull Separator from the barrel for everyday use, or the granular path when you want a tighter bundle.
import { Separator } from "@brika/clay";import { Separator } from "@brika/clay/components/separator";A minimal example
Drop this into a page. Native HTML attributes pass through to the underlying primitive.
import { Separator } from '@brika/clay/components/separator';
/** Horizontal separator dividing two content blocks. */
export default function SeparatorDefaultDemo() {
return (
<div className="flex w-full max-w-xs flex-col gap-3">
<p className="text-sm font-medium">Billing</p>
<Separator />
<p className="text-muted-foreground text-sm">Manage your subscription and payment methods.</p>
</div>
);
}Separator, every way
Accessibility
- Renders
<hr>withrole="separator", meaningful to AT when it divides distinct content sections. - Pass
aria-orientation="vertical"when used as a vertical divider between inline items. - Purely decorative separators should carry
aria-hidden="true".
Theme tokens
Every CSS variable Separator reads, with its default and the
dotted path you'd write in a ThemeConfig JSON
to override it. Set any of these in your theme to retune Separator
without touching component code.
Separator tokens
3 tokens--separator-colorcolorvar(--border)components.separator.colorSeparator line color.
--separator-widthborder-width1pxcomponents.separator.widthSeparator line thickness.
--separator-styleborder-stylesolidcomponents.separator.styleSeparator line style (`solid`, `dashed`, `double`).
Override in a theme
Authoring a theme is plain JSON. Drop overrides under
components.separator, the names
are camelCase versions of the variable suffix.
{
"id": "my-theme",
"name": "My Theme",
"description": "...",
"accentSwatches": ["#000"],
"components": {
"separator": {
"color": "var(--border)"
}
}
}
Then apply with applyTheme(myTheme)
(see the theming guide),
scope it to a subtree with themeToCssVars(myTheme, mode),
or consume any token directly in your own JSX with the matching Tailwind utility
(e.g. bg-separator-…) — see the
chips on each token row.
API reference
Props specific to Separator. Native HTML attributes pass through to the underlying primitive, see the component source on GitHub for the full type signature.
No wrapper-specific props, all attributes pass through to the underlying primitive.