Horizontal Rule

A semantic horizontal rule with a variant that breaks out to the full container width, edge to edge, whatever the parent's 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.

Invoices go out on the first of each month.


Plan changes start on your next invoice.

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.
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.