Section Rule
A line between page sections that runs past the page rails, with a mark on each intersection.
Section one
Section two
Customize
Mark
Bleed32px
Dashed
Line1px
Installation
npx shadcn@latest add https://fancyborders.vercel.app/r/section-rule.jsonThe CLI copies the component into your project, adds anything it is built on, and writes its CSS into your global stylesheet. New to the CLI? See Installation.
Examples
Dashes and other marks
A rule takes a dash pattern and any corner mark, or none.
Plus marks
Dashed, no marks
Thicker, in colour
To the page edges
Good to know
- Set bleed to true to run the line a full viewport width each way. The page then needs overflow-x: clip on an ancestor.
- The rule is as tall as the frame's line, so frame-line-2 thickens it. For a band rather than a line, use the hatch divider.
API reference
SectionRule
tsx
import { SectionRule } from "@/components/section-rule";| Prop | Type | Default |
|---|---|---|
| bleed | boolean | number | stringHow far the line runs past each end. true runs it a full viewport width each way. | false |
| mark | "bracket" | "square" | "plus" | "dot" | falseMark drawn on each end of the line. | "square" |
| dash | number | stringDash length. Setting dash or gap makes the line dashed. | 4 |
| gap | number | stringSpace between dashes. | 4 |
Also accepts every Frame prop and every div attribute.