CraftUI

Separator

A theme-aware groove between sections, horizontal or vertical.

Video settings

GraphicsDisplayControls

Installation

npx shadcn@latest add @runqora/craft-separator

Usage

import { Separator } from "@/components/craft/separator";

<Separator />;
<Separator orientation="vertical" />;

A vertical separator takes the height of its container, so give the container a height.

Props

Prop

Type

Accessibility

  • Has the separator role and its orientation for screen readers.
  • If it's only decoration, render a plain element instead, so that it isn't announced.

Customization

The groove is two lines drawn from the surface tokens, and --craft-unit sets how thick they are.

<Separator className="[--craft-unit:1px]" />

Dependencies

Source

On this page