Ruled Lines
ProNewEvenly spaced rules with an optional margin line, like a notebook page.
Installation
pnpm dlx shadcn@latest add @viewport/ruled-lines
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| spacing | numberDistance between rules in CSS pixels. | 24 |
| orientation | "horizontal" | "vertical"Direction the rules run. | "horizontal" |
| margin | numberDraw a margin line this many CSS pixels from the leading edge. Omit for none. | — |
| className | stringUse text color utilities to tint the rules. | — |
| style | CSSProperties | — |
Accessibility
- Decorative and hidden from assistive technology.
- Ignores pointer events and is hidden in forced-colors mode.
- Static and requires no browser JavaScript to paint.