Skip to content

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

Free

With Text Left Separator for Vue

The label Continue with at the start of a row, with a horizontal line running to the far end.

UI library: Ark UI

Continue with sits at the start of the row, and a horizontal line runs from it to the end. The label keeps its width as the row grows.

Lead with the label when it introduces the block below, such as another way to sign in. A heading in a Card is clearer when those words title a whole section. In Vue, 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 items-center gap-2">
  <span class="shrink-0 text-muted-foreground text-xs">Continue with</span>
  <Separator class="flex-1" />
</div>

FAQ

How is the label pinned to the start?

The span comes first with shrink-0, then a Separator with flex-1. The row is flex items-center gap-2, so the line runs to the end and the words keep their width.

Why does flex-1 matter on the Separator?

Separator includes shrink-0. flex-1 is merged after that class, and cn() keeps flex-1, which sets shrink too. The line then uses the space left after the label.

How is Continue with styled?

The span text is Continue with, with text-xs and text-muted-foreground. Change the text there. A long label leaves little room for the line.

Should this label be a heading?

This demo uses a span. Use a heading element when the words belong in the page outline, and keep shrink-0 on it.

Is the line vertical?

No. orientation stays horizontal, so the separator is one pixel tall. flex-1 grows it across the row.

Are the lines announced with Ark UI?

The words beside the line are what people need to hear. The line has role separator, so it can be announced. A border is quieter when the line is only visual.

API Reference

Separator

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