Black Friday is here 🔥 Get Wensity Pro for 20% less with

Separator

A React separator and Tailwind divider with optional text labels, solid, gradient, or dashed lines, and horizontal or vertical orientation for layouts.

Loading preview

Examples

Practical examples and common states for the same installable component.

Horizontal

Default horizontal line to divide rows of text.

examples/separator-horizontal.tsx
import { Separator } from "@/components/wensity/separator";
export function SeparatorHorizontal() {
return (
<div className="w-[320px] p-4 text-xs">
<span className="text-zinc-400">System Logs</span>
<Separator className="my-3" />
<span className="text-zinc-400">Errors</span>
</div>
);
}

Vertical

Vertical lines to split columns or list elements.

examples/separator-vertical.tsx
import { Separator } from "@/components/wensity/separator";
export function SeparatorVertical() {
return (
<div className="flex h-8 items-center gap-4 text-xs p-4 text-zinc-400">
<span>Dashboard</span>
<Separator orientation="vertical" />
<span>Analytics</span>
<Separator orientation="vertical" />
<span>Settings</span>
</div>
);
}

With Label

Splits divider line using custom text alignment settings.

examples/separator-label.tsx
import { Separator } from "@/components/wensity/separator";
export function SeparatorLabel() {
return (
<div className="w-[320px] p-4">
<Separator label="securing connection" labelPosition="center" />
</div>
);
}

Gradient

Fades out transparently at the ends of the divider.

examples/separator-gradient.tsx
import { Separator } from "@/components/wensity/separator";
export function SeparatorGradient() {
return (
<div className="w-[320px] p-4">
<Separator variant="gradient" />
</div>
);
}

Dashed

Uses a dashed style to draw a segment divider.

examples/separator-dashed.tsx
import { Separator } from "@/components/wensity/separator";
export function SeparatorDashed() {
return (
<div className="w-[320px] p-4">
<Separator variant="dashed" />
</div>
);
}

Overview

Separator is a React and Tailwind CSS divider, in Next.js or any React app, that replaces a bare hr with a line that carries the separator role and the right aria-orientation. It runs horizontally or vertically in a solid, gradient fade, or dashed style, and label places a small caption on the line, such as OR between sign in options, at the start, center, or end. Every line color comes from the border token, so it follows your theme without extra classes. A vertical separator needs a parent with height, such as a flex row, or it collapses to nothing.

Installation

Run the following command

~/your-project
pnpm dlx wensity@latest add separator

Usage

Import Separator from @/components/wensity/separator and render it anywhere in your React or Next.js app. The source lands in your own repo, so every prop, class and animation below is yours to edit.

app/example.tsx
import { Separator } from "@/components/wensity/separator";
export function SeparatorDemo() {
return (
<div className="w-full">
<span>Section 1</span>
<Separator className="my-4" />
<span>Section 2</span>
</div>
);
}

Props

PropTypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Axis the rule runs along.
variant"default" | "gradient" | "dashed""default"Line treatment.
labelReact.ReactNode-Text set into the rule, for section breaks such as OR.
labelPosition"start" | "center" | "end""center"Where the label sits along the rule.
  • Underline Animation component preview

    Underline Animation

    CSS hover underlines for links: slide, center, fill, wavy, and gradient.

  • Text Scribble component preview

    Text Scribble

    Hand-drawn scribble, squiggly underline, strike, circle, and box marks for text.

  • Glass Stripes component preview

    Glass Stripes

    Diagonal glass stripes refract a slow, glowing light that follows your pointer.

  • Bento Grid Layout component preview

    Bento Grid Layout

    A responsive bento grid of dashboard tiles where clicking one moves it to the front and the rest glide into place.