Free shadcn/ui separator (divider) component for React — built on Radix. Horizontal and vertical orientations, a labeled "or continue with" divider, section dividers, and styled variants, with proper role="separator" accessibility.

Installation

1 Configure registry — once per project
{
  "registries": {
    "@designrevision": "https://registry.designrevision.com/r/{name}.json"
  }
}

Add to your existing components.json. Requires shadcn/ui v2.3+.

2 Install the component

Packages

@radix-ui/react-separator
utils

Props

No props documented yet.

Copied!
components/ui/separator.tsx
"use client"

import * as React from "react"
import * as SeparatorPrimitive from "@radix-ui/react-separator"

import { cn } from "@/lib/utils"

function Separator({
  className,
  orientation = "horizontal",
  decorative = true,
  ...props
}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {
  return (
    <SeparatorPrimitive.Root
      data-slot="separator"
      decorative={decorative}
      orientation={orientation}
      className={cn(
        "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
        className
      )}
      {...props}
    />
  )
}

export { Separator }

Examples

Horizontal & vertical

The canonical separator — a horizontal divider plus vertical separators between inline links.

Packages

separator

Props

No props documented yet.

Copied!
components/ui/separator-demo-01.tsx
import { Separator } from "@/components/ui/separator"

export default function SeparatorDemo01() {
  return (
    <div className="w-full max-w-sm">
      <div className="space-y-1">
        <h4 className="text-sm leading-none font-medium">Radix Primitives</h4>
        <p className="text-muted-foreground text-sm">
          An open-source UI component library.
        </p>
      </div>
      <Separator className="my-4" />
      <div className="flex h-5 items-center space-x-4 text-sm">
        <div>Blog</div>
        <Separator orientation="vertical" />
        <div>Docs</div>
        <Separator orientation="vertical" />
        <div>Source</div>
      </div>
    </div>
  )
}

Labeled divider

An **"Or continue with"** divider — a label masking the middle of the line, the classic auth-form pattern.

Packages

separator

Props

No props documented yet.

Copied!
components/ui/separator-label-01.tsx
import { Separator } from "@/components/ui/separator"

export default function SeparatorLabel01() {
  return (
    <div className="w-full max-w-sm py-2">
      <div className="relative">
        <Separator />
        <span className="bg-background text-muted-foreground absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 px-2 text-xs uppercase">
          Or continue with
        </span>
      </div>
    </div>
  )
}

Section dividers

Horizontal separators between the rows of a settings card.

Packages

separator

Props

No props documented yet.

Copied!
components/ui/separator-list-01.tsx
import { Separator } from "@/components/ui/separator"

const settings = [
  { label: "Profile", value: "Ada Lovelace" },
  { label: "Email", value: "[email protected]" },
  { label: "Plan", value: "Pro" },
  { label: "Billing", value: "Visa •••• 4242" },
]

export default function SeparatorList01() {
  return (
    <div className="bg-card text-card-foreground w-full max-w-sm rounded-lg border">
      <div className="px-4 py-3">
        <h4 className="text-sm font-medium">Account</h4>
      </div>
      <Separator />
      <div className="px-4">
        {settings.map((row, i) => (
          <div key={row.label}>
            <div className="flex items-center justify-between py-3 text-sm">
              <span className="text-muted-foreground">{row.label}</span>
              <span className="font-medium">{row.value}</span>
            </div>
            {i < settings.length - 1 && <Separator />}
          </div>
        ))}
      </div>
    </div>
  )
}

Vertical stat splits

A row of stat counters divided by vertical separators — the profile-header metrics pattern.

Packages

separator

Props

No props documented yet.

Copied!
components/ui/separator-stats-01.tsx
import { Separator } from "@/components/ui/separator"

const stats = [
  { label: "Posts", value: "1,240" },
  { label: "Followers", value: "350k" },
  { label: "Following", value: "80" },
]

export default function SeparatorStats01() {
  return (
    <div className="flex h-10 items-center gap-4 text-sm">
      {stats.map((stat, i) => (
        <div key={stat.label} className="flex h-full items-center gap-4">
          <div className="flex flex-col">
            <span className="font-semibold">{stat.value}</span>
            <span className="text-muted-foreground text-xs">{stat.label}</span>
          </div>
          {i < stats.length - 1 && <Separator orientation="vertical" />}
        </div>
      ))}
    </div>
  )
}

Footer nav splits

Footer links separated by vertical separators — a compact, inline nav bar.

Packages

separator

Props

No props documented yet.

Copied!
components/ui/separator-footer-01.tsx
import { Separator } from "@/components/ui/separator"

const links = ["About", "Blog", "Careers", "Terms", "Privacy"]

export default function SeparatorFooter01() {
  return (
    <div className="flex h-5 items-center gap-3 text-sm">
      {links.map((link, i) => (
        <div key={link} className="flex h-full items-center gap-3">
          <a href="#" className="text-muted-foreground hover:text-foreground">
            {link}
          </a>
          {i < links.length - 1 && <Separator orientation="vertical" />}
        </div>
      ))}
    </div>
  )
}

Styled & decorative

The separator is just a themeable element — colored, gradient-fade, thicker, and inset variants.

Packages

separator

Props

No props documented yet.

Copied!
components/ui/separator-styled-01.tsx
import { Separator } from "@/components/ui/separator"

export default function SeparatorStyled01() {
  return (
    <div className="w-full max-w-sm space-y-6">
      <div className="space-y-1.5">
        <p className="text-muted-foreground text-xs">Colored</p>
        <Separator className="bg-primary" />
      </div>
      <div className="space-y-1.5">
        <p className="text-muted-foreground text-xs">Gradient fade</p>
        <Separator className="bg-linear-to-r from-transparent via-border to-transparent" />
      </div>
      <div className="space-y-1.5">
        <p className="text-muted-foreground text-xs">Thicker</p>
        <Separator className="h-0.5! rounded-full" />
      </div>
      <div className="space-y-1.5">
        <p className="text-muted-foreground text-xs">Inset</p>
        <div className="px-10">
          <Separator />
        </div>
      </div>
    </div>
  )
}

Frequently asked questions

It is a thin divider line that visually or semantically separates content, built on @radix-ui/react-separator. It renders horizontally by default or vertically with orientation="vertical", and it sets the right accessibility role so assistive tech understands it as a separator. Use it between sections, between inline links, or anywhere you would reach for an
.
Yes — "separator" and "divider" are the same UI element. Libraries like MUI and Chakra call it Divider; shadcn (following Radix and the ARIA spec) calls it Separator. If you searched for a shadcn divider, this is it.
Pass orientation="vertical": . A vertical separator takes its height from its parent, so put it in a flex row with a set height — e.g. a div with flex h-5 items-center — and it will fill that height as a 1px-wide line between the items. The Horizontal & vertical and Vertical stat splits examples show it.
A plain
only works horizontally and carries fixed default styling. The Separator works in both orientations, is styled with your design tokens (bg-border), and — because it is built on Radix — exposes the correct role and aria-orientation. By default it is decorative (hidden from screen readers); set decorative={false} when the divide is semantically meaningful.
It is just an element, so style it with a className. Change the color with bg-* (e.g. bg-primary or a gradient), and override the thickness with an important utility like h-0.5! (the default h-px / w-px comes from a data-orientation variant, so the ! makes your value win). The Styled & decorative example shows colored, gradient-fade, thicker, and inset dividers.
Put the Separator and a label in a relative container and absolutely-center the label with a background that masks the line behind it (bg-background). That gives the familiar "—— OR CONTINUE WITH ——" look used on login forms. The Labeled divider example is ready to copy.