Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Thick Separator for Svelte

A 4 pixel horizontal line between Chapter one and Chapter two, thicker than the default hairline.

UI library: Ark UI

Chapter one sits above a horizontal line, and Chapter two sits below it. The line is 4 pixels tall, thicker than the usual hairline.

Use the thick line for a chapter break, not for every row in a list. A double hairline is quieter, and a Card is louder, when you need a different weight. In Svelte, Ark UI draws the line and not the space around it.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Separator anatomy: horizontal, vertical

Usage

<div class="flex w-full max-w-sm flex-col gap-6"><p class="text-sm">Chapter one</p><Separator class="data-horizontal:h-1" /><p class="text-sm">Chapter two</p></div>

FAQ

When should I use a thick separator?

For a rare, important break: a new chapter, a new settings category. Don't thicken every line or the page turns into stripes.

Why not just pass className h-1?

The component sets its height with an orientation variant, which comes after a plain h-1 in the stylesheet, so the line would stay one pixel. Use the same variant and the merge replaces the default height. Here that's data-horizontal:h-1.

Should thick separators use a different color?

Usually not: the thickness is the emphasis. A brand color can work for one special break, not for every section.

Does a thick line need more space around it?

Yes. Pair it with gap-6 or gap-8, as here, so the line doesn't sit on the text.

Is a thick separator more accessible?

It's easier to see, but it's exposed to assistive tech exactly like a thin one. Headings still carry the structure.

Thick line or double line?

Thick is modern and bold; double is formal and traditional. Pick one style for your product and keep it.

API Reference

Separator

No extra props in this demo. The rest is on the Separator page.