Menu

Divider

Section separator. 4 types.

Installation

$ npx uix-ui@latest add divider

This copies the file into components/ui/divider.tsx in your project. npx shadcn@latest add @uix/divider works too.

Usage

divider.tsx
import { Divider } from "@/components/ui/divider";

<div style={{ width: 320, display: "grid", gap: 20 }}>
  <Divider />
  <Divider type="dashed" />
  <Divider type="with-label" label="or" />
  <Divider type="with-icon" icon={<Star />} />
</div>

Props

PropTypeDefaultDescription
type"solid" | "dashed" | "with-label" | "with-icon""solid"
labelReact.ReactNode–Text in the middle of the "with-label" divider.
iconReact.ReactNode–Icon in the middle of the "with-icon" divider.

Everything else is passed to the root element, so className, aria-* and event handlers work as usual.

Dependencies

Installed for you by the CLI.

  • class-variance-authority
  • clsx
  • tailwind-merge
  • lib/utils.ts
esc

↑↓ to navigate · ↵ to select · esc to close