UI

Separator

A horizontal or vertical rule, labelled where a stack needs a break.

Read Markdown

Web 0.2.0

  • Defaultlight7.93 : 1AA 4.5dark9.07 : 1AA 4.5
  • measured on 0.2.0
npx shadcn@latest add @maeso/separator
Size
5.5 kB gzipmeasured on 0.2.0

Usage

Place a separator between distinct groups. Choose its orientation to match the layout.

Accessibility

Use semantic separation only when it conveys structure. Keep purely visual rules decorative.

When to use

Use when spacing alone does not make grouping clear. Do not use repeated rules as a substitute for headings.

Install

Add this registry to your project's components.json once, before the first install. Keep your existing settings and other registries.

{
  "registries": {
    "@maeso": "http://127.0.0.1:4321/r/{name}.json"
  }
}

Then install the registry's default theme once, and import its sheet in the CSS entry that imports Tailwind. It paints every item from this registry.

npx shadcn@latest add @maeso/maeso
@import "./styles/theme.web.css";
npx shadcn@latest add @maeso/separator

Props

Separator

PropTypeRequiredDescription
labelstring | undefinednoTurns the rule into a labelled break in a stack.
orientation"horizontal" | "vertical" | undefinedno
spacingstring | undefinednoA CSS length applied on the axis across the rule.
styleCSSProperties | undefinedno
Also accepts 1 inherited prop
PropTypeRequiredDescription
weight"hairline" | "standard" | "strong" | undefinedno

Proof

Contrast

measured on 0.2.0

StateForegroundBackgroundRatioFloor
defaultrgb(67 77 86)rgb(248 245 240)7.93AA 4.5
default (dark)rgb(181 182 182)rgb(7 21 34)9.07AA 4.5

Size

5484 gzip bytes · measured on 0.2.0

Example

import { Separator } from "@/components/ui/_kit/display/separator/Separator";

const Example = () => (
		<div className="w-full max-w-105">
			<Separator label="Details" />
		</div>
	);
export default Example;

not on native yet