Separator Examples
20 dividers: horizontal section breaks, vertical lines between links, spacing options, dashed, dotted, gradient and thick styles, and lines with text. Each on React, Vue, Svelte and Solid, with Base UI, React Aria, Ark UI or Radix UI on React.
Every separator example
20 examples.
- Dashed SeparatorStyledA dashed horizontal line between Optional extras and Add-on services, on a transparent track.

- Default SpacingSpacingA horizontal line between Profile details and Notification preferences, with a 16 pixel gap on each side.

- Dotted SeparatorStyledA dotted horizontal line between the rows Subtotal and Total due, lighter than a solid rule.

- Double LineStyledTwo stacked horizontal lines between Awarded to and For outstanding work, read as one double rule.

- Gradient SeparatorStyledA horizontal line between Introduction and Details that fades in from the edges through the border color.

- Horizontal SeparatorBasicA horizontal line between a title with its tagline and the short paragraph that sits underneath.

- In NavigationBasicVertical lines between the links Home, Products, and About in a short navigation row of fixed height.

- Inset SeparatorSpacingA horizontal line between Section 1 and Section 2 that stops short of both edges of the row.

- List SeparatorBasicHorizontal lines between three key and value rows: Item 1, Item 2, and Item 3, with muted values.

- Menu SeparatorBasicVertical lines between Settings, Account, and Help, each with a title and a short description.

- Section DividerBasicA horizontal line between Profile and Preferences, each with a heading and one line of supporting text.

- Simple LineBasicA single horizontal line with the separator's default look, and no text or spacing around it.

Or describe it. With Pro, your AI agent installs the separator example you describe, on your framework and UI library.
Get ProGalleries
More component examples
8 related galleries, free: open one for its live examples and their code.
Pricing
Separator examples MCP, with Pro
Your AI agent installs any of the 1364 examples, and every component, block and icon, with every Pro plan.
4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.
- Secure checkout via Stripe
- Code lives in your repo
- Keep what you've shipped if you cancel
- License terms
FAQ
Frequently asked questions
A thin line between groups of content: settings sections, links in a header, the OR between two sign-in options. shadcn.io's Separator draws a one-pixel line in the `border` color, horizontal or vertical. It comes for React on Base UI, React Aria, Ark UI and Radix UI, and for Vue, Svelte and Solid on Ark UI.
Yes. Every example is free to use in personal and commercial projects, with no attribution. Seeing the code and installing it takes a free shadcn.io account.
One component draws both orientations with the same theme color, and it tells assistive tech it's a separator where that matters. A border on a neighbor is fine for a one-off edge that's only visual.
When the groups are related but distinct and spacing alone is ambiguous, like sections of a long settings form. Skip it where cards or headings already show the structure; a line between every paragraph is noise.
Make a flex row with `items-center` and `gap-2`: a `Separator` with `flex-1`, the short text, and another `Separator` with `flex-1`. Drop one of the lines to pin the text to the start or the end.
Set `orientation="vertical"` and place it in a flex row with a height, such as `h-5`. The line stretches to the row's height.
With classes. Dashed and dotted lines use a top border with `border-dashed` or `border-dotted` on a transparent line. A gradient replaces the fill with `bg-linear-to-r from-transparent via-border to-transparent`. A thicker line overrides the height with the component's orientation variant, such as `data-horizontal:h-1`.
Sign in with a free account, open the example and run the install command it shows. It adds the example and the Separator component to your project, for your framework and UI library.
Put it in a flex column and use `gap`: `gap-1` for dense lists, `gap-4` for most sections, `gap-8` for major breaks. A margin on the separator, such as `my-6`, works when the parent isn't a flex container.
It depends on the library. On Radix UI, `decorative` is true by default, so the line is hidden from assistive tech; set it to false when the break means something. On Base UI, React Aria, Ark UI, Vue, Svelte and Solid, the line is exposed as a separator.
shadcn.io's Separator, built on Base UI, React Aria, Ark UI or Radix UI in React and on Ark UI in Vue, Svelte and Solid, styled with Tailwind CSS.
The line never takes focus, so keyboard users move straight between links and controls. Let headings carry the structure and use the line as a visual aid, and check that the `border` color contrasts enough with the background.
Yes. Each example looks the same on every target. Only a few class names differ where the libraries render different elements, such as the `hr` on React Aria.
4.9 out of 5 from 150+ developers
Every separator example. One prompt away.
Every separator example is free with an account. With Pro, your AI agent installs them from a prompt.
Get Pro






















