Component reference
Separator
Separate account-setting groups without extra content.
Preview
Live previewOptional six-digit hex. Clear to restore the preset. Check contrast with your brand color.
Changes apply to this preview only.
Account settings
Sections divided by separators.
Profile
Name, photo, email
Security
Password, two-factor
Notifications
Email and push
Toolbar
Vertical separators between inline actions.
Order summary
The total is separated from the lines.
Width adapts to the available space
"use client";
import {
Card,
CardHeader,
CardTitle,
CardDescription,
CardContent,
Separator
} from "@pimolu/react";
export function DemoExample() {
return (
<div
className="grid grid-cols-[repeat(auto-fit,minmax(min(100%,280px),1fr))] gap-6 min-w-0 items-start"
>
<Card>
<CardHeader>
<CardTitle>Account settings</CardTitle>
<CardDescription>Sections divided by separators.</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-5 min-w-0">
<div>
<p>Profile</p>
<p className="text-sm text-muted leading-relaxed">Name, photo, email</p>
</div>
<Separator />
<div>
<p>Security</p>
<p className="text-sm text-muted leading-relaxed">Password, two-factor</p>
</div>
<Separator appearance="dashed" />
<div>
<p>Notifications</p>
<p className="text-sm text-muted leading-relaxed">Email and push</p>
</div>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Toolbar</CardTitle>
<CardDescription>Vertical separators between inline actions.</CardDescription>
</CardHeader>
<CardContent>
<div className="flex items-center gap-4">
<span>Profile</span>
<Separator orientation="vertical" />
<span>Settings</span>
<Separator orientation="vertical" />
<span>Logout</span>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Order summary</CardTitle>
<CardDescription>The total is separated from the lines.</CardDescription>
</CardHeader>
<CardContent>
<div className="grid gap-5 min-w-0">
<div
className="flex flex-wrap items-center gap-3 min-w-0 justify-between"
>
<span className="text-sm text-muted leading-relaxed">Subtotal</span>
<span>€148</span>
</div>
<div
className="flex flex-wrap items-center gap-3 min-w-0 justify-between"
>
<span className="text-sm text-muted leading-relaxed">Shipping</span>
<span>€9</span>
</div>
<Separator thickness="medium" />
<div
className="flex flex-wrap items-center gap-3 min-w-0 justify-between"
>
<strong>Total</strong>
<strong>€157</strong>
</div>
</div>
</CardContent>
</Card>
</div>
);
}More examples
Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.
Orientation
Horizontal fills its container; vertical stretches to the height of a flex or grid row.
Appearances
solid, dashed and dotted line styles.
Thickness
Relative to the preset control border width.
Usage
Use a separator for meaningful grouping; use layout gap for ordinary spacing.
API reference
Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.
PimoluSeparatorProps
Type source| Name | Type | Default | Description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | undefined | "horizontal" | Direction of the separator. |
appearance | "solid" | "dashed" | "dotted" | undefined | "solid" | Visual line style. |
thickness | "medium" | "thin" | "thick" | undefined | "thin" | Line thickness. |
variant | "primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined | "neutral" | Semantic color variant. |
decorative | boolean | undefined | true | Hide the separator from assistive technology. |
onChange | ChangeEventHandler<HTMLDivElement, Element> | undefined | — | Standard React/HTML attribute. |
defaultValue | string | number | readonly string[] | undefined | — | Standard React/HTML attribute. |
className | string | undefined | — | Standard React/HTML attribute. |
style | CSSProperties | undefined | — | Standard React/HTML attribute. |
aria-label | string | undefined | — | Defines a string value that labels the current element. |
onClick | MouseEventHandler<HTMLDivElement> | undefined | — | Standard React/HTML attribute. |
orientation"horizontal" | "vertical" | undefinedDefault: "horizontal"
Direction of the separator.
appearance"solid" | "dashed" | "dotted" | undefinedDefault: "solid"
Visual line style.
thickness"medium" | "thin" | "thick" | undefinedDefault: "thin"
Line thickness.
variant"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefinedDefault: "neutral"
Semantic color variant.
decorativeboolean | undefinedDefault: true
Hide the separator from assistive technology.
onChangeChangeEventHandler<HTMLDivElement, Element> | undefinedNo default extracted.
Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefinedNo default extracted.
Standard React/HTML attribute.
classNamestring | undefinedNo default extracted.
Standard React/HTML attribute.
styleCSSProperties | undefinedNo default extracted.
Standard React/HTML attribute.
aria-labelstring | undefinedNo default extracted.
Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLDivElement> | undefinedNo default extracted.
Standard React/HTML attribute.
Accessibility
- Keep decorative separators out of the reading order and label structural regions when needed.