UI.MD

Horizontal Rule

A semantic horizontal rule with a container-width breakout variant that spans the --container token edge-to-edge regardless of parent padding, plus a full-width variant.

Installation

$
npx shadcn@latest add https://ui.mattdowney.com/r/hr.json

Usage

import { Hr } from "@/components/ui/hr"

Examples

Default

width="full" fills the immediate content box. The default width="container" variant breaks out to span the full --container token edge-to-edge, ignoring any parent padding.

The quick brown fox jumps over the lazy dog.


A second paragraph, separated by the rule above.

API Reference

PropTypeDefaultDescription
width"container" | "full""container"container breaks out edge-to-edge to the --container token width regardless of parent padding; full fills the immediate content box.
thickness"hairline""hairline"Paints 0.5px so the rule stays one device pixel on 2x displays.