ComponentsData & surfaces
Separator
Shared primitiveSeparate related groups without implying a new card.
@/components/ui/separator
Composition preview
Try Separator alongside its related data & surfaces components. These examples keep all actions local.
| Post | Status |
|---|---|
| A small product update | Draft |
| A useful lesson | Approved |
Usage
import { Separator } from "@/components/ui/separator";
<>
<Separator decorative />
</>Composition recipe. Supply application state, handlers and persistence in the owning product component. Inspect the installed source before extending its API.
API & composition
orientation: horizontal or vertical; decorative; asChild
Usage & accessibility
Use decorative separators for visual spacing and a semantic separator only when the boundary conveys meaning.
Implementation contract
src/components/ui/separator.tsx
Use named variants and semantic theme tokens. Preserve existing input values, refs, focus and cancellation behavior. Verify keyboard, narrow layouts and pending/error states when behavior changes.