ZaidanHomeDocsComponentsBlocksChartsTypesetCreate

Command Palette

Search for a command to run...

GitHub
New
Sections
  • Introduction
  • Components
  • Blocks
  • Installation
  • Customization
  • Dark Mode
  • Typeset
  • Zaidan Skills
  • FAQ
  • Roadmap
  • Changelog
Installation
  • Astro
  • Manual
  • Solid Start
  • TanStack Router
  • TanStack Start
  • Vite
Blocks
  • Data Grid
  • Event Calendar
  • Filters
  • Gantt
  • Image Crop
  • Kanban
  • Message Scroller
  • Questionnaire
  • Sortable
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Aspect Ratio
  • Attachment
  • Avatar
  • Badge
  • Breadcrumb
  • Bubble
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • Context Menu
  • Dialog
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kbd
  • Label
  • Marker
  • Menubar
  • Message
  • Native Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Resizable
  • Scroll Area
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Spinner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip

Separator

Visually or semantically separates content.

Kobalte
Kobalte

The Separator component is built on top of Kobalte Separator, which provides the accessible separator primitive.

shadcn/ui
The Foundation for your Design System
A set of beautifully designed components that you can customize, extend, and build on.
1
import { Separator } from "~/components/ui/separator";
2
3
export default function SeparatorDemo() {
4
return (
5
<div class="flex max-w-sm flex-col gap-4 text-sm">
6
<div class="flex flex-col gap-1.5">
7
<div class="font-medium leading-none">shadcn/ui</div>
8
<div class="text-muted-foreground">The Foundation for your Design System</div>
9
</div>
10
<Separator />
11
<div>
12
A set of beautifully designed components that you can customize, extend, and build on.
13
</div>
14
</div>
15
);
16
}

Installation

pnpm dlx shadcn@latest add @zaidan/separator
npx shadcn@latest add @zaidan/separator
yarn dlx shadcn@latest add @zaidan/separator
bunx --bun shadcn@latest add @zaidan/separator

Usage

1
import { Separator } from "~/components/ui/separator";
1
<Separator />

Vertical

Use orientation="vertical" for a vertical separator.

Blog
Docs
Source
1
import { Separator } from "~/components/ui/separator";
2
3
export default function SeparatorVerticalDemo() {
4
return (
5
<div class="flex h-5 items-center gap-4 text-sm">
6
<div>Blog</div>
7
<Separator orientation="vertical" />
8
<div>Docs</div>
9
<Separator orientation="vertical" />
10
<div>Source</div>
11
</div>
12
);
13
}

Menu

Vertical separators between menu items with descriptions.

SettingsManage preferences
AccountProfile & security
HelpSupport & docs
1
import { Separator } from "~/components/ui/separator";
2
3
export default function SeparatorMenuDemo() {
4
return (
5
<div class="flex items-center gap-2 text-sm md:gap-4">
6
<div class="flex flex-col gap-1">
7
<span class="font-medium">Settings</span>
8
<span class="text-muted-foreground text-xs">Manage preferences</span>
9
</div>
10
<Separator orientation="vertical" />
11
<div class="flex flex-col gap-1">
12
<span class="font-medium">Account</span>
13
<span class="text-muted-foreground text-xs">Profile &amp; security</span>
14
</div>
15
<Separator orientation="vertical" class="hidden md:block" />
16
<div class="hidden flex-col gap-1 md:flex">
17
<span class="font-medium">Help</span>
18
<span class="text-muted-foreground text-xs">Support &amp; docs</span>
19
</div>
20
</div>
21
);
22
}

List

Horizontal separators between list items.

Item 1
Value 1
Item 2
Value 2
Item 3
Value 3
1
import { Separator } from "~/components/ui/separator";
2
3
export default function SeparatorListDemo() {
4
return (
5
<div class="flex w-full max-w-sm flex-col gap-2 text-sm">
6
<dl class="flex items-center justify-between">
7
<dt>Item 1</dt>
8
<dd class="text-muted-foreground">Value 1</dd>
9
</dl>
10
<Separator />
11
<dl class="flex items-center justify-between">
12
<dt>Item 2</dt>
13
<dd class="text-muted-foreground">Value 2</dd>
14
</dl>
15
<Separator />
16
<dl class="flex items-center justify-between">
17
<dt>Item 3</dt>
18
<dd class="text-muted-foreground">Value 3</dd>
19
</dl>
20
</div>
21
);
22
}

API Reference

See the Kobalte Separator API reference for primitive props, accessibility, and separator semantics.

On This Page

  • Installation
  • Usage
  • Vertical
  • Menu
  • List
  • API Reference
Built by Kevin Abatan. The source code is available on GitHub.