# fancyborders > fancyborders is a free, open-source collection of borders, frames and enclosures for React and Tailwind CSS v4: structural frames (corner brackets, hatched dividers, intersection marks), page structure (rails, section rules, section grids), shaped outlines (bevelled, notched and scooped corners, tickets, folders, speech bubbles, zigzag and scalloped edges), line styles, and effects (gradient, glow, a travelling beam, a pointer spotlight, liquid metal). Components are copied into the project with the shadcn CLI, not installed as a package. Source: https://fancyborders.vercel.app. Each section below is also served on its own at the address given. --- # Introduction > fancyborders is a free, open-source collection of borders, frames and enclosures for React and Tailwind CSS v4: structural frames (corner brackets, hatched dividers, intersection marks), page structure (rails, section rules, section grids), shaped outlines (bevelled, notched and scooped corners, tickets, folders, speech bubbles, zigzag and scalloped edges), line styles, and effects (gradient, glow, a travelling beam, a pointer spotlight, liquid metal). Components are copied into the project with the shadcn CLI, not installed as a package. Most component libraries stop at `border` and `rounded`. This one is only about the edges of an interface: corner brackets and hatched dividers, outlines that are not rectangles, dash patterns a CSS border cannot draw, and borders that glow, travel or turn to metal. ## Frames and layers Everything is built from one primitive. A `Frame` is a positioned box, and you put decoration layers inside it next to your content: a border, rules, corner marks, a pattern fill, an effect. Layers are absolutely positioned, so they never affect layout and can go in any order. ```tsx import { Frame, FrameCorners, FrameFill, FrameRules } from "@/components/ui/frame"; Content ``` The named components are short recipes over those layers, so you can use them as they are, or open them up and change them. ```tsx import { BracketFrame } from "@/components/bracket-frame"; ``` ## Quick start In a project that uses React, Tailwind CSS v4 and the shadcn CLI, add any component with one command: ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/bracket-frame.json ``` ## Working with it - Install a component with the shadcn CLI: `npx shadcn@latest add https://fancyborders.vercel.app/r/frame.json`. The CLI copies the source into the project, adds the items it is built on, and writes its CSS into the global stylesheet. With the registry namespace set up (`npx shadcn@latest registry add @fancyborders=https://fancyborders.vercel.app/r/{name}.json`), `npx shadcn@latest add @fancyborders/frame` works too. - Everything is a `Frame` (from `@/components/ui/frame`) with decoration layers inside it, next to the content. Layers are absolutely positioned, never affect layout, and can go in any order. Presets such as `BracketFrame` and `GlowFrame` are short recipes over those layers. - Pages marked "recipe" have no registry item of their own: install the item they name, then copy the code from the page. - Style frames with Tailwind utilities rather than props where you can: `frame-color-*`, `frame-line-*`, `frame-radius-*`, and `frame-from-*` / `frame-via-*` / `frame-to-*` for effect colours. They take variants (`hover:`, `dark:`) and inherit, so a utility on a section themes every frame inside it. - Pad the frame, not the layers: give a frame the padding its content needs, and at least as much as any inset or bracket gap. - Effects work in light and dark mode. Give an effect card a background of its own (`bg-card`), and give shape frames a `fill` when using a glow, because the halo is the whole shape blurred behind it. - `frame-spotlight`, `frame-metal` and `edge-frame` are client components. Everything else renders on the server and is plain CSS. - Every animation stops for people who prefer reduced motion. ## Components ### Frames Structural frames: brackets, rails, marks and hatching. - [Frame](https://fancyborders.vercel.app/docs/components/frame.md): The primitive everything else is built from: an enclosure plus border, rule, corner-mark and fill layers you compose yourself. Item: `frame`. - [Bracket Frame](https://fancyborders.vercel.app/docs/components/bracket-frame.md): Corner brackets around a dashed border. Item: `bracket-frame`. - [Hatch Divider](https://fancyborders.vercel.app/docs/components/hatch-divider.md): A hatched band between two lines for separating page sections, with marks where it meets the page rails. Item: `hatch-divider`. - [Crosshair](https://fancyborders.vercel.app/docs/components/crosshair.md): Rules that overshoot their corners, with a mark on each one. Item: `frame` (recipe). - [Blueprint](https://fancyborders.vercel.app/docs/components/blueprint.md): A pattern fill behind a border, with marks at the corners. Item: `frame` (recipe). ### Structure Rails, rules and section grids that lay out a whole page. - [Page Rails](https://fancyborders.vercel.app/docs/components/page-rails.md): The column a page is laid out in: a vertical rail down each side, optionally with a patterned gutter. Item: `page-rails`. - [Section Rule](https://fancyborders.vercel.app/docs/components/section-rule.md): A line between page sections that runs past the page rails, with a mark on each intersection. Item: `section-rule`. - [Section Grid](https://fancyborders.vercel.app/docs/components/section-grid.md): A grid whose cells share one line between them, with a mark on every crossing and columns that change at breakpoints. Item: `section-grid`. ### Shapes Outlines that are not rectangles, with borders that follow them. - [Shape Frame](https://fancyborders.vercel.app/docs/components/shape-frame.md): A frame whose outline follows a shape: bevelled, notched, scooped or rounded corners, and edges with a bite taken out. Item: `shape-frame`. - [Ticket Frame](https://fancyborders.vercel.app/docs/components/ticket-frame.md): A ticket with rounded corners, a perforated line and a tear-off stub. Item: `ticket-frame`. - [Folder Frame](https://fancyborders.vercel.app/docs/components/folder-frame.md): A folder with a tab on its top edge and a sloping shoulder down to the body. Item: `folder-frame`. - [Speech Bubble](https://fancyborders.vercel.app/docs/components/speech-bubble.md): A rounded box with a tail on any edge. The border runs around the tail unbroken. Item: `bubble-frame`. - [Edge Frame](https://fancyborders.vercel.app/docs/components/edge-frame.md): A frame with a pattern cut into its edges: zigzag teeth, waves, scallops or the bites of a stamp. Item: `edge-frame`. - [Receipt](https://fancyborders.vercel.app/docs/components/receipt.md): A slip of paper torn off along a zigzag edge. Item: `edge-frame` (recipe). - [Stamp](https://fancyborders.vercel.app/docs/components/stamp.md): A postage stamp: round bites out of all four edges. Item: `edge-frame` (recipe). ### Lines Line styles for any frame: dashes, native styles and motion. - [Dash Patterns](https://fancyborders.vercel.app/docs/components/dash-patterns.md): Dashed lines with the dash and the gap set independently, which a CSS border cannot do. Item: `frame` (recipe). - [Border Styles](https://fancyborders.vercel.app/docs/components/border-styles.md): Solid, dashed, dotted and double borders that follow the radius and can sit inside or outside the frame's edge. Item: `frame` (recipe). - [Marching Ants](https://fancyborders.vercel.app/docs/components/marching-ants.md): Dashed rules whose dashes travel around the frame, like a selection rectangle. Item: `frame` (recipe). ### Effects Gradient, glow and moving light, as more layers for a frame. - [Beam](https://fancyborders.vercel.app/docs/components/beam.md): A light that travels the border at a steady speed, around any proportions and any corner. Item: `beam-frame`. - [Glow](https://fancyborders.vercel.app/docs/components/glow.md): A gradient border with a halo of the same colours glowing behind it, still or turning. Item: `glow-frame`. - [Gradient](https://fancyborders.vercel.app/docs/components/gradient.md): A gradient drawn on the frame's line, in any colours and at any angle, optionally turning around the frame. Item: `frame-effects`. - [Pulse](https://fancyborders.vercel.app/docs/components/pulse.md): A halo that breathes in and out, for something that is live, recording or waiting. Item: `frame-effects` (recipe). - [Spotlight](https://fancyborders.vercel.app/docs/components/spotlight.md): Borders that light up near the pointer, across every frame on the page at once. Item: `frame-spotlight`. - [Liquid Metal](https://fancyborders.vercel.app/docs/components/liquid-metal.md): A moving metal ring drawn with WebGL, in chromatic, silver and gold. Item: `frame-metal`. --- # Installation > Components are copied into your project, one command each. There is no package to install or keep up to date. ## Requirements - React 18 or later. - Tailwind CSS v4. - A `components.json` file, which the shadcn CLI reads to know where your components and stylesheet live. Create one with `npx shadcn@latest init`. ## Install with the CLI Every component page has its own command. This one adds the bracket frame: ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/bracket-frame.json ``` The CLI copies the component into your components folder (for example `components/bracket-frame.tsx`), adds anything it is built on (here the `frame` primitive in `components/ui/frame.tsx`), and writes the component's CSS into your global stylesheet. Other package managers: `pnpm dlx shadcn@latest add …`, `yarn dlx shadcn@latest add …`, `bunx --bun shadcn@latest add …`. ## The registry namespace Add the registry to `components.json` once, then install by name: ```bash npx shadcn@latest registry add @fancyborders=https://fancyborders.vercel.app/r/{name}.json npx shadcn@latest add @fancyborders/bracket-frame ``` That writes this to `components.json`: ```json { "registries": { "@fancyborders": "https://fancyborders.vercel.app/r/{name}.json" } } ``` The registry index is at https://fancyborders.vercel.app/r/registry.json. ## Use it ```tsx import { BracketFrame } from "@/components/bracket-frame"; export function Feature() { return (

Corner brackets

Around anything you put inside.

); } ``` ## Install by hand Copy every file the item lists, dependencies first, from its registry JSON (https://fancyborders.vercel.app/r/.json) or its page. The CSS belongs in your global stylesheet after the Tailwind import, so its rules land in Tailwind's `components` layer and utilities can still override them: ```css @import "tailwindcss"; /* Component CSS goes here, after Tailwind. */ @layer components { .fb-frame { /* … */ } } ``` Components import a `cn` helper from `@/lib/utils`, the same one shadcn/ui uses. Without it, install `clsx` and `tailwind-merge` and add: ```ts import { clsx, type ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); } ``` ## Browser support Structural frames and line styles use only widely supported CSS. Curved shape corners need the CSS `shape()` function and fall back to a rectangular border. The beam needs `offset-path` (Chromium 116, Firefox 122, Safari 18) and leaves the plain border without it. Liquid metal needs WebGL and shows the frame's plain line without it. --- # Theming > Frames read their colours and sizes from custom properties, and each one has a Tailwind utility. Style a frame the way you style anything else. ## Utilities Put these on a frame to restyle every layer inside it. Colour utilities take theme colours, arbitrary values and opacity modifiers, such as `frame-color-sky-500/50`. | Utility | Sets | | --- | --- | | `frame-color-*` | Line colour of borders, rules and fills | | `frame-line-*` | Line width, in pixels | | `frame-radius-*` | Corner radius, from the theme or an arbitrary length | | `frame-mark-*` | Colour of corner marks | | `frame-fill-*` | Colour of fill patterns | | `frame-surface-*` | Colour painted behind hollow marks | | `frame-bg-*` | Background inside a shape frame | | `frame-from-*` | First colour of the effect layers | | `frame-via-*` | Middle colour of the effect layers | | `frame-to-*` | Last colour of the effect layers | | `frame-duration-*` | Time for one turn of a gradient or one lap of a beam, in milliseconds | | `section-cols-*` | Columns of a section grid, from 1 to 8 | ## Variants They are ordinary utilities, so they work with every Tailwind variant: hover, focus, dark, breakpoints, group and peer states. ```tsx ``` ## Theming a whole section The properties inherit, so a utility on any ancestor themes every frame beneath it. ```tsx
… …
``` ## Effect palettes Gradient, glow and beam layers share one palette. Set it once on the frame and every effect layer inside uses it, or pass `colors` to a single layer. ```tsx import { Frame } from "@/components/ui/frame"; import { FrameGradient } from "@/components/ui/frame-effects"; export default function GradientUtilities() { return (

frame-via-indigo-300

); } ``` ## Custom properties The utilities set these properties. You can set them yourself, in a stylesheet or a style attribute. | Property | Sets | | --- | --- | | `--fb-line` | Line width | | `--fb-line-color` | Line colour | | `--fb-radius` | Corner radius | | `--fb-surface` | Colour behind hollow marks; defaults to --background | | `--fb-mark-color` | Colour of corner marks | | `--fb-fill-color` | Colour of fill patterns | | `--fb-from, --fb-via, --fb-to` | Effect palette | | `--fb-duration` | Effect timing | --- # AI & agents > fancyborders is built to be found and used by AI coding agents as well as people. ## MCP server A hosted MCP server, nothing to install: https://fancyborders.vercel.app/mcp (Streamable HTTP, no auth). ```bash claude mcp add --transport http fancyborders https://fancyborders.vercel.app/mcp ``` Cursor (`.cursor/mcp.json`) and most other clients: ```json { "mcpServers": { "fancyborders": { "url": "https://fancyborders.vercel.app/mcp" } } } ``` Tools: `list_components`, `search_components`, `get_component`, `get_install_command`, `get_component_source`, `get_guide`. ## Agent skill ```bash npx skills add ommgh/fancyborders ``` The skill is in the repository at `skills/fancyborders`: https://github.com/ommgh/fancyborders/tree/master/skills/fancyborders ## shadcn registry and MCP ```bash npx shadcn@latest registry add @fancyborders=https://fancyborders.vercel.app/r/{name}.json npx shadcn@latest mcp init ``` The shadcn MCP server can then browse, search and install from the registry. ## llms.txt and Markdown - https://fancyborders.vercel.app/llms.txt: an index of the docs. - https://fancyborders.vercel.app/llms-full.txt: every page in one file. - Any docs page as Markdown: add `.md` to its address, or request it with `Accept: text/markdown`. --- # Components > All 24 of them. Each page has a live preview with controls, the install command, examples and props. ### Frames Structural frames: brackets, rails, marks and hatching. - [Frame](https://fancyborders.vercel.app/docs/components/frame.md): The primitive everything else is built from: an enclosure plus border, rule, corner-mark and fill layers you compose yourself. Item: `frame`. - [Bracket Frame](https://fancyborders.vercel.app/docs/components/bracket-frame.md): Corner brackets around a dashed border. Item: `bracket-frame`. - [Hatch Divider](https://fancyborders.vercel.app/docs/components/hatch-divider.md): A hatched band between two lines for separating page sections, with marks where it meets the page rails. Item: `hatch-divider`. - [Crosshair](https://fancyborders.vercel.app/docs/components/crosshair.md): Rules that overshoot their corners, with a mark on each one. Item: `frame` (recipe). - [Blueprint](https://fancyborders.vercel.app/docs/components/blueprint.md): A pattern fill behind a border, with marks at the corners. Item: `frame` (recipe). ### Structure Rails, rules and section grids that lay out a whole page. - [Page Rails](https://fancyborders.vercel.app/docs/components/page-rails.md): The column a page is laid out in: a vertical rail down each side, optionally with a patterned gutter. Item: `page-rails`. - [Section Rule](https://fancyborders.vercel.app/docs/components/section-rule.md): A line between page sections that runs past the page rails, with a mark on each intersection. Item: `section-rule`. - [Section Grid](https://fancyborders.vercel.app/docs/components/section-grid.md): A grid whose cells share one line between them, with a mark on every crossing and columns that change at breakpoints. Item: `section-grid`. ### Shapes Outlines that are not rectangles, with borders that follow them. - [Shape Frame](https://fancyborders.vercel.app/docs/components/shape-frame.md): A frame whose outline follows a shape: bevelled, notched, scooped or rounded corners, and edges with a bite taken out. Item: `shape-frame`. - [Ticket Frame](https://fancyborders.vercel.app/docs/components/ticket-frame.md): A ticket with rounded corners, a perforated line and a tear-off stub. Item: `ticket-frame`. - [Folder Frame](https://fancyborders.vercel.app/docs/components/folder-frame.md): A folder with a tab on its top edge and a sloping shoulder down to the body. Item: `folder-frame`. - [Speech Bubble](https://fancyborders.vercel.app/docs/components/speech-bubble.md): A rounded box with a tail on any edge. The border runs around the tail unbroken. Item: `bubble-frame`. - [Edge Frame](https://fancyborders.vercel.app/docs/components/edge-frame.md): A frame with a pattern cut into its edges: zigzag teeth, waves, scallops or the bites of a stamp. Item: `edge-frame`. - [Receipt](https://fancyborders.vercel.app/docs/components/receipt.md): A slip of paper torn off along a zigzag edge. Item: `edge-frame` (recipe). - [Stamp](https://fancyborders.vercel.app/docs/components/stamp.md): A postage stamp: round bites out of all four edges. Item: `edge-frame` (recipe). ### Lines Line styles for any frame: dashes, native styles and motion. - [Dash Patterns](https://fancyborders.vercel.app/docs/components/dash-patterns.md): Dashed lines with the dash and the gap set independently, which a CSS border cannot do. Item: `frame` (recipe). - [Border Styles](https://fancyborders.vercel.app/docs/components/border-styles.md): Solid, dashed, dotted and double borders that follow the radius and can sit inside or outside the frame's edge. Item: `frame` (recipe). - [Marching Ants](https://fancyborders.vercel.app/docs/components/marching-ants.md): Dashed rules whose dashes travel around the frame, like a selection rectangle. Item: `frame` (recipe). ### Effects Gradient, glow and moving light, as more layers for a frame. - [Beam](https://fancyborders.vercel.app/docs/components/beam.md): A light that travels the border at a steady speed, around any proportions and any corner. Item: `beam-frame`. - [Glow](https://fancyborders.vercel.app/docs/components/glow.md): A gradient border with a halo of the same colours glowing behind it, still or turning. Item: `glow-frame`. - [Gradient](https://fancyborders.vercel.app/docs/components/gradient.md): A gradient drawn on the frame's line, in any colours and at any angle, optionally turning around the frame. Item: `frame-effects`. - [Pulse](https://fancyborders.vercel.app/docs/components/pulse.md): A halo that breathes in and out, for something that is live, recording or waiting. Item: `frame-effects` (recipe). - [Spotlight](https://fancyborders.vercel.app/docs/components/spotlight.md): Borders that light up near the pointer, across every frame on the page at once. Item: `frame-spotlight`. - [Liquid Metal](https://fancyborders.vercel.app/docs/components/liquid-metal.md): A moving metal ring drawn with WebGL, in chromatic, silver and gold. Item: `frame-metal`. --- # Frame > The primitive everything else is built from: an enclosure plus border, rule, corner-mark and fill layers you compose yourself. - Category: Frames (Structural frames: brackets, rails, marks and hatching.) - Registry item: `frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/frame ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame`. Files it adds: `components/ui/frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame, FrameCorners, FrameRules } from "@/components/ui/frame"; Content ``` ## Examples ### Tailwind tokens Colour, line width and radius are ordinary utilities, so they take variants like hover and dark. ```tsx import { Frame, FrameBorder, FrameCorners } from "@/components/ui/frame"; export default function FrameTokens() { return (

frame-color-sky-500/50

); } ``` ### Custom corner marks Pass children to FrameCorners to draw your own mark. It is drawn for the top-left corner and rotated onto the others. ```tsx import { Frame, FrameBorder, FrameCorners } from "@/components/ui/frame"; export default function FrameCustomMark() { return (

Diamond marks

); } ``` ## Good to know - Layers are absolutely positioned and never take part in layout, so they can go inside a frame in any order, before or after the content. - Every layer reads its line width, colour and radius from the frame, so setting them once on the frame restyles all of them. ## API reference ### Frame ```tsx import { Frame } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `radius` | `number \| string` | `0` | Corner radius shared by the frame and its layers. | | `line` | `number \| string` | `1` | Line width shared by borders, rules and marks. | | `color` | `string` | `22% of the text colour` | Line colour for borders, rules and fills. | Also accepts every div attribute, such as className and style. ### FrameBorder ```tsx import { FrameBorder } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"solid" \| "dashed" \| "dotted" \| "double"` | `"solid"` | The CSS border style. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | | `color` | `string` | – | Overrides the frame's line colour for this layer. | Also accepts every div attribute, such as className and style. ### FrameRules ```tsx import { FrameRules } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `all four` | Which sides get a line. | | `overshoot` | `number \| string \| { x?, y? }` | `0` | How far the lines run past the corners. x extends the horizontal lines, y the vertical ones. | | `dash` | `number \| string` | `4` | Dash length. Setting dash or gap makes the lines dashed. | | `gap` | `number \| string` | `4` | Space between dashes. | | `march` | `boolean \| number` | `false` | Make the dashes travel clockwise. A number is the seconds a dash takes to reach the next one's place; true is 0.6. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `color` | `string` | – | Overrides the frame's line colour for this layer. | Also accepts every div attribute, such as className and style. ### FrameCorners ```tsx import { FrameCorners } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `mark` | `"bracket" \| "square" \| "plus" \| "dot"` | `"bracket"` | Built-in mark. Ignored when children are given. | | `children` | `ReactNode` | – | A custom mark, drawn for the top-left corner and repeated on the rest. | | `corners` | `("tl" \| "tr" \| "br" \| "bl")[]` | `all four` | Which corners get a mark. | | `size` | `number \| string` | `12, 7, 11 or 5` | Width and height of each mark. The default depends on the mark: bracket, square, plus, dot. | | `thickness` | `number \| string` | – | Line width of the mark, when different from the frame's. | | `align` | `"inside" \| "center"` | – | inside tucks the mark into the corner, center centres it on the frame's line. Brackets and custom marks default to inside. | | `rotate` | `boolean` | `true` | Rotate each mark to face its corner. Turn off for upright content. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Radius of a bracket's corner, when different from the frame's. | | `color` | `string` | – | Colour of the marks. Defaults to the text colour. | Also accepts every div attribute, such as className and style. ### FrameFill ```tsx import { FrameFill } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `pattern` | `"hatch" \| "cross" \| "dots" \| "grid"` | `"hatch"` | The pattern painted behind the content. | | `size` | `number \| string` | `6` | Spacing between lines or dots. | | `thickness` | `number \| string` | `1` | Line width, or dot radius. | | `angle` | `string` | `"135deg"` | Direction of the hatch lines. | | `inset` | `number \| string` | `0` | Distance kept clear from the frame's edge. | | `color` | `string` | – | Colour of the pattern. Defaults to the line colour. | Also accepts every div attribute, such as className and style. --- # Bracket Frame > Corner brackets around a dashed border. - Category: Frames (Structural frames: brackets, rails, marks and hatching.) - Registry item: `bracket-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/bracket-frame ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/bracket-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/bracket-frame`. The CLI also adds what `bracket-frame` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/bracket-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { BracketFrame } from "@/components/bracket-frame"; Your content ``` ## Good to know - The brackets sit on the box edge and the dashed border is drawn inside them, so give the frame at least as much padding as the gap. ## API reference ### BracketFrame ```tsx import { BracketFrame } from "@/components/bracket-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `bracket` | `number \| string` | `14` | Length of each bracket arm. | | `thickness` | `number \| string` | `2` | Line width of the brackets. | | `gap` | `number` | `6` | Space between the brackets and the dashed border inside them. | Also accepts every Frame prop and every div attribute. --- # Hatch Divider > A hatched band between two lines for separating page sections, with marks where it meets the page rails. - Category: Frames (Structural frames: brackets, rails, marks and hatching.) - Registry item: `hatch-divider` - Live preview with controls: https://fancyborders.vercel.app/docs/components/hatch-divider ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/hatch-divider.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/hatch-divider`. The CLI also adds what `hatch-divider` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/hatch-divider.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { HatchDivider } from "@/components/hatch-divider"; ``` ## Examples ### Between page rails In a column that draws its own side rails, the marks land on the intersections. This site's pages are built this way. ```tsx import { HatchDivider } from "@/components/hatch-divider"; import { Frame, FrameRules } from "@/components/ui/frame"; export default function DividerRails() { return (

Section one

Section two

Section three

); } ``` ## Good to know - Set bleed to true to run the lines a full viewport width each way. The page then needs overflow-x: clip on an ancestor. ## API reference ### HatchDivider ```tsx import { HatchDivider } from "@/components/hatch-divider"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `bleed` | `boolean \| number \| string` | `false` | How far the top and bottom lines run past the band. true runs them a full viewport width each way. | | `mark` | `"bracket" \| "square" \| "plus" \| "dot" \| false` | `"square"` | Mark drawn where the band's lines meet its sides. | Also accepts every Frame prop and every div attribute. Set its height with a class such as h-5. --- # Crosshair > Rules that overshoot their corners, with a mark on each one. - Category: Frames (Structural frames: brackets, rails, marks and hatching.) - Registry item: `frame` — Crosshair is a recipe: a few layers of `frame` put together, not an item of its own. Install `frame` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/crosshair ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame`. Files it adds: `components/ui/frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame, FrameCorners, FrameRules } from "@/components/ui/frame"; Content ``` ## API reference ### FrameRules ```tsx import { FrameRules } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `all four` | Which sides get a line. | | `overshoot` | `number \| string \| { x?, y? }` | `0` | How far the lines run past the corners. x extends the horizontal lines, y the vertical ones. | | `dash` | `number \| string` | `4` | Dash length. Setting dash or gap makes the lines dashed. | | `gap` | `number \| string` | `4` | Space between dashes. | | `march` | `boolean \| number` | `false` | Make the dashes travel clockwise. A number is the seconds a dash takes to reach the next one's place; true is 0.6. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `color` | `string` | – | Overrides the frame's line colour for this layer. | Also accepts every div attribute, such as className and style. ### FrameCorners ```tsx import { FrameCorners } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `mark` | `"bracket" \| "square" \| "plus" \| "dot"` | `"bracket"` | Built-in mark. Ignored when children are given. | | `children` | `ReactNode` | – | A custom mark, drawn for the top-left corner and repeated on the rest. | | `corners` | `("tl" \| "tr" \| "br" \| "bl")[]` | `all four` | Which corners get a mark. | | `size` | `number \| string` | `12, 7, 11 or 5` | Width and height of each mark. The default depends on the mark: bracket, square, plus, dot. | | `thickness` | `number \| string` | – | Line width of the mark, when different from the frame's. | | `align` | `"inside" \| "center"` | – | inside tucks the mark into the corner, center centres it on the frame's line. Brackets and custom marks default to inside. | | `rotate` | `boolean` | `true` | Rotate each mark to face its corner. Turn off for upright content. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Radius of a bracket's corner, when different from the frame's. | | `color` | `string` | – | Colour of the marks. Defaults to the text colour. | Also accepts every div attribute, such as className and style. --- # Blueprint > A pattern fill behind a border, with marks at the corners. - Category: Frames (Structural frames: brackets, rails, marks and hatching.) - Registry item: `frame` — Blueprint is a recipe: a few layers of `frame` put together, not an item of its own. Install `frame` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/blueprint ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame`. Files it adds: `components/ui/frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame, FrameBorder, FrameCorners, FrameFill, } from "@/components/ui/frame"; Content ``` ## API reference ### FrameFill ```tsx import { FrameFill } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `pattern` | `"hatch" \| "cross" \| "dots" \| "grid"` | `"hatch"` | The pattern painted behind the content. | | `size` | `number \| string` | `6` | Spacing between lines or dots. | | `thickness` | `number \| string` | `1` | Line width, or dot radius. | | `angle` | `string` | `"135deg"` | Direction of the hatch lines. | | `inset` | `number \| string` | `0` | Distance kept clear from the frame's edge. | | `color` | `string` | – | Colour of the pattern. Defaults to the line colour. | Also accepts every div attribute, such as className and style. ### FrameBorder ```tsx import { FrameBorder } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"solid" \| "dashed" \| "dotted" \| "double"` | `"solid"` | The CSS border style. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | | `color` | `string` | – | Overrides the frame's line colour for this layer. | Also accepts every div attribute, such as className and style. ### FrameCorners ```tsx import { FrameCorners } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `mark` | `"bracket" \| "square" \| "plus" \| "dot"` | `"bracket"` | Built-in mark. Ignored when children are given. | | `children` | `ReactNode` | – | A custom mark, drawn for the top-left corner and repeated on the rest. | | `corners` | `("tl" \| "tr" \| "br" \| "bl")[]` | `all four` | Which corners get a mark. | | `size` | `number \| string` | `12, 7, 11 or 5` | Width and height of each mark. The default depends on the mark: bracket, square, plus, dot. | | `thickness` | `number \| string` | – | Line width of the mark, when different from the frame's. | | `align` | `"inside" \| "center"` | – | inside tucks the mark into the corner, center centres it on the frame's line. Brackets and custom marks default to inside. | | `rotate` | `boolean` | `true` | Rotate each mark to face its corner. Turn off for upright content. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Radius of a bracket's corner, when different from the frame's. | | `color` | `string` | – | Colour of the marks. Defaults to the text colour. | Also accepts every div attribute, such as className and style. --- # Page Rails > The column a page is laid out in: a vertical rail down each side, optionally with a patterned gutter. - Category: Structure (Rails, rules and section grids that lay out a whole page.) - Registry item: `page-rails` - Live preview with controls: https://fancyborders.vercel.app/docs/components/page-rails ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/page-rails.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/page-rails`. The CLI also adds what `page-rails` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/page-rails.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { PageRails } from "@/components/page-rails"; Your sections ``` ## Examples ### A whole page Rails, section rules and a section grid together. The rules cross the rails, and the grid's lines stop at them. ```tsx import { PageRails } from "@/components/page-rails"; import { SectionRule } from "@/components/section-rule"; import { SectionGrid } from "@/components/ui/section-grid"; const FEATURES = [ ["Rails", "Two lines the page hangs from."], ["Rules", "Lines that cross the rails."], ["Grids", "Cells that share their lines."], ["Marks", "One on every crossing."], ]; export default function PageLayout() { return (

Acme

A page laid out on its own lines.

{FEATURES.map(([name, text]) => (

{name}

{text}

))}
Free and open source
); } ``` ## Good to know - Everything inside sits flush with the rails, so pad your sections rather than the column. That is what lets a rule, a divider or a grid meet the rails exactly. - With bleed set to true the rails run a full viewport height past each end. The page then needs overflow-y: clip on an ancestor. ## API reference ### PageRails ```tsx import { PageRails } from "@/components/page-rails"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `bleed` | `boolean \| number \| string` | `false` | How far the rails run past the top and bottom of the column. true runs them a full viewport height each way. | | `gutter` | `number \| string` | – | Width of a gutter down each side. A second pair of rails is drawn this far inside the first, and the content sits between the inner pair. | | `fill` | `"hatch" \| "cross" \| "dots" \| "grid"` | – | Pattern drawn in the gutters. | | `dash` | `number \| string` | `4` | Dash length. Setting dash or gap makes the rails dashed. | | `gap` | `number \| string` | `4` | Space between dashes. | Also accepts every Frame prop and every div attribute. --- # Section Rule > A line between page sections that runs past the page rails, with a mark on each intersection. - Category: Structure (Rails, rules and section grids that lay out a whole page.) - Registry item: `section-rule` - Live preview with controls: https://fancyborders.vercel.app/docs/components/section-rule ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/section-rule.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/section-rule`. The CLI also adds what `section-rule` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/section-rule.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { PageRails } from "@/components/page-rails"; import { SectionRule } from "@/components/section-rule";
Section one
Section two
``` ## Examples ### Dashes and other marks A rule takes a dash pattern and any corner mark, or none. ```tsx import { PageRails } from "@/components/page-rails"; import { SectionRule } from "@/components/section-rule"; export default function RuleStyles() { return (

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 | Description | | --- | --- | --- | --- | | `bleed` | `boolean \| number \| string` | `false` | How far the line runs past each end. true runs it a full viewport width each way. | | `mark` | `"bracket" \| "square" \| "plus" \| "dot" \| false` | `"square"` | Mark drawn on each end of the line. | | `dash` | `number \| string` | `4` | Dash length. Setting dash or gap makes the line dashed. | | `gap` | `number \| string` | `4` | Space between dashes. | Also accepts every Frame prop and every div attribute. --- # Section Grid > A grid whose cells share one line between them, with a mark on every crossing and columns that change at breakpoints. - Category: Structure (Rails, rules and section grids that lay out a whole page.) - Registry item: `section-grid` - Live preview with controls: https://fancyborders.vercel.app/docs/components/section-grid ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/section-grid.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/section-grid`. The CLI also adds what `section-grid` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/section-grid.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { SectionGrid } from "@/components/ui/section-grid";
Rails
Rules
Grids
Marks
Dashes
Fills
``` ## Examples ### Columns at breakpoints The column utilities take variants. When the last row is not full, the space left over stays open. ```tsx import { SectionGrid } from "@/components/ui/section-grid"; const STATS = [ ["1.2M", "requests"], ["48ms", "median response"], ["99.98%", "uptime"], ["312", "deploys"], ["0", "incidents"], ]; export default function GridResponsive() { return ( {STATS.map(([value, label]) => (

{value}

{label}

))}
); } ``` ### Cells as links Lines sit in the gaps between cells, so a background on a cell never covers them. ```tsx import { SectionGrid } from "@/components/ui/section-grid"; const LINKS = ["Docs", "Components", "Theming", "GitHub"]; export default function GridHover() { return ( {LINKS.map((name) => ( {name} → ))} ); } ``` ## Good to know - Set the columns with section-cols-1 to section-cols-8 rather than grid-cols-*. The grid counts its cells to find the last column and the last row, which is how it draws every line once and none on its outer edge. - Every direct child is a cell. The lines are each cell's ::after and the marks its ::before, and cells are given position: relative. - The counting assumes one track per cell. On a cell that spans, set --fb-cell-right and --fb-cell-bottom to 1 or 0 to say whether it has a line to its right and beneath it. - Directly inside page rails the grid stops at the rails instead of crossing them. ## API reference ### SectionGrid ```tsx import { SectionGrid } from "@/components/ui/section-grid"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"solid" \| "dashed" \| "dotted"` | `"solid"` | Line style of the lines between cells, and of the outline. | | `mark` | `"plus" \| "square" \| "dot" \| false` | `false` | Mark drawn on every crossing of two lines. | | `markSize` | `number \| string` | `11, 7 or 5` | Width and height of each mark. The default depends on the mark: plus, square, dot. | | `outline` | `boolean` | `false` | Draw a border around the whole grid as well. | Also accepts every Frame prop and every div attribute. Set the columns with a class from section-cols-1 to section-cols-8. --- # Shape Frame > A frame whose outline follows a shape: bevelled, notched, scooped or rounded corners, and edges with a bite taken out. - Category: Shapes (Outlines that are not rectangles, with borders that follow them.) - Registry item: `shape-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/shape-frame ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/shape-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/shape-frame`. The CLI also adds what `shape-frame` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { ShapeFrame } from "@/components/ui/shape-frame"; Content ``` ## Examples ### A different corner each Pass an object to give every corner its own treatment. ```tsx import { ShapeFrame } from "@/components/ui/shape-frame"; export default function ShapeMixed() { return (

One of each

); } ``` ### With Tailwind variants The fill and line colour are utilities, so they change on hover like any other. ```tsx import { ShapeFrame } from "@/components/ui/shape-frame"; export default function ShapeVariants() { return (

hover:frame-color-sky-500

); } ``` ## Good to know - The border, fill and drop-shadow filter follow the shape in every browser. Where border-shape is supported (Chromium 147 and later) the focus outline, box-shadow and hit area follow it too. - Curved corners (round and scoop) need the CSS shape() function and fall back to a plain rectangular border without it. - A shape frame is still a frame, so corner marks, fills and effect layers compose inside it. - For an outline of your own, build it with polygonPaths and pass it as path. The folder, the speech bubble and the edge frame are made this way. ## API reference ### ShapeFrame ```tsx import { ShapeFrame } from "@/components/ui/shape-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `corner` | `CornerShape \| Partial>` | `"bevel"` | Corner treatment: "square", "round", "bevel", "notch" or "scoop". One for every corner, or an object with one per corner. | | `corners` | `("tl" \| "tr" \| "br" \| "bl")[]` | `all four` | Limits a single corner treatment to these corners. | | `size` | `number` | `12` | Size of the corner treatment, in pixels. | | `line` | `number` | `1` | Line width, in pixels. | | `punch` | `{ sides?, at?, radius? }` | – | Semicircular bites out of the edges: which sides (left and right by default), where along the edge (the middle), and their radius (8). | | `fill` | `string` | – | Background painted inside the shape. Any CSS background works. | | `path` | `ShapePath` | – | A ready-made outline from polygonPaths, in place of the corners and the punch. | Also accepts every Frame prop except radius, and every div attribute. --- # Ticket Frame > A ticket with rounded corners, a perforated line and a tear-off stub. - Category: Shapes (Outlines that are not rectangles, with borders that follow them.) - Registry item: `ticket-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/ticket-frame ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/ticket-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/ticket-frame`. The CLI also adds what `ticket-frame` is built on: `frame`, `shape-frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, `components/ticket-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { TicketFrame } from "@/components/ticket-frame"; } fill="var(--background)" className="drop-shadow-md" > Your content ``` ## Good to know - Use a drop-shadow filter rather than box-shadow for a shadow that follows the bites in every browser. ## API reference ### TicketFrame ```tsx import { TicketFrame } from "@/components/ticket-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `stub` | `ReactNode` | – | Content of the tear-off stub on the right. Required. | | `stubWidth` | `number` | `112` | Width of the stub, in pixels. | | `punchRadius` | `number` | `9` | Radius of the bites at the top and bottom of the perforation. | | `radius` | `number` | `12` | Radius of the outer corners. | Also accepts line, fill, color and every div attribute. --- # Folder Frame > A folder with a tab on its top edge and a sloping shoulder down to the body. - Category: Shapes (Outlines that are not rectangles, with borders that follow them.) - Registry item: `folder-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/folder-frame ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/folder-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/folder-frame`. The CLI also adds what `folder-frame` is built on: `frame`, `shape-frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, `components/folder-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { FolderFrame } from "@/components/folder-frame";
Your content
``` ## Good to know - The tab's content goes in the tab prop. The children start below the tab, so pad them rather than the frame. - The outline is a plain polygon, so the border, fill and drop-shadow follow it in every browser. ## API reference ### FolderFrame ```tsx import { FolderFrame } from "@/components/folder-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `tab` | `ReactNode` | – | Content of the tab, such as a label. | | `tabSide` | `"left" \| "right"` | `"left"` | Which end of the top edge the tab sits on. | | `tabWidth` | `number` | `112` | Width of the tab's top edge, in pixels. | | `tabHeight` | `number` | `28` | Height of the tab, in pixels. | | `slope` | `number` | `14` | How far the tab's shoulder runs sideways on its way down, in pixels. | | `radius` | `number` | `10` | Radius of the corners, in pixels. | Also accepts line, fill, color and every div attribute. --- # Speech Bubble > A rounded box with a tail on any edge. The border runs around the tail unbroken. - Category: Shapes (Outlines that are not rectangles, with borders that follow them.) - Registry item: `bubble-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/speech-bubble ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/bubble-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/bubble-frame`. The CLI also adds what `bubble-frame` is built on: `frame`, `shape-frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, `components/bubble-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { BubbleFrame } from "@/components/bubble-frame"; Shipped it. ``` ## Examples ### A conversation Tails on opposite sides, each a fixed distance from its own end. ```tsx import { BubbleFrame } from "@/components/bubble-frame"; export default function BubbleChat() { return (
Is the new border live? Deployed a minute ago. It goes all the way round the tail!
); } ``` ## Good to know - The tail is drawn inside the frame's box, and the content is kept clear of it, so a bubble takes the room its box says it does. - A negative at counts from the far end of the edge, which keeps the tail a fixed distance from the right or the bottom. ## API reference ### BubbleFrame ```tsx import { BubbleFrame } from "@/components/bubble-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `side` | `"top" \| "right" \| "bottom" \| "left"` | `"bottom"` | The edge the tail points out of. | | `at` | `number \| `${number}%`` | `28` | Where the tail sits along its edge: pixels from the left or top, pixels from the other end when negative, or a percentage. | | `tailSize` | `number` | `10` | How far the tail sticks out, in pixels. | | `tailWidth` | `number` | `16` | Width of the tail where it joins the bubble, in pixels. | | `lean` | `number` | `0` | How far the tip leans along the edge, in pixels. Negative leans back. | | `radius` | `number` | `14` | Radius of the corners, in pixels. | Also accepts line, fill, color and every div attribute. --- # Edge Frame > A frame with a pattern cut into its edges: zigzag teeth, waves, scallops or the bites of a stamp. - Category: Shapes (Outlines that are not rectangles, with borders that follow them.) - Registry item: `edge-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/edge-frame ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/edge-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/edge-frame`. The CLI also adds what `edge-frame` is built on: `frame`, `shape-frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, `components/edge-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { EdgeFrame } from "@/components/edge-frame"; Content ``` ## Examples ### With effects A gradient and a glow inside an edge frame take its outline. ```tsx import { EdgeFrame } from "@/components/edge-frame"; import { FrameGlow, FrameGradient } from "@/components/ui/frame-effects"; export default function EdgeEffects() { return (

Limited edition

A gradient on a scalloped edge.

); } ``` ## Good to know - Each edge fits a whole number of repeats, so the pattern never ends on half a tooth. Doing that needs the frame's size, so this is a client component that measures itself; before it has, and without JavaScript, it is a plain rectangle. - Zigzags, waves and scallops stand on a line set in from the box by the depth. Give the frame at least that much padding on the patterned edges. - It is still a shape frame, so effect layers follow the pattern. ## API reference ### EdgeFrame ```tsx import { EdgeFrame } from "@/components/edge-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `edge` | `"zigzag" \| "wave" \| "scallop" \| "bite"` | `"zigzag"` | The pattern cut into the edges: zigzag teeth, a wave, a scallop of round bumps, or round bites like the edge of a stamp. | | `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `top and bottom` | Which edges get the pattern. | | `size` | `number` | `16` | Length of one tooth, wave or bump, in pixels. Each edge fits a whole number of them, so the real length is the closest that divides it. | | `depth` | `number` | `8` | How far the pattern reaches in from the edge, in pixels. | Also accepts line, fill, color and every div attribute. --- # Receipt > A slip of paper torn off along a zigzag edge. - Category: Shapes (Outlines that are not rectangles, with borders that follow them.) - Registry item: `edge-frame` — Receipt is a recipe: a few layers of `edge-frame` put together, not an item of its own. Install `edge-frame` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/receipt ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/edge-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/edge-frame`. The CLI also adds what `edge-frame` is built on: `frame`, `shape-frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, `components/edge-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { EdgeFrame } from "@/components/edge-frame"; Your receipt ``` ## API reference ### EdgeFrame ```tsx import { EdgeFrame } from "@/components/edge-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `edge` | `"zigzag" \| "wave" \| "scallop" \| "bite"` | `"zigzag"` | The pattern cut into the edges: zigzag teeth, a wave, a scallop of round bumps, or round bites like the edge of a stamp. | | `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `top and bottom` | Which edges get the pattern. | | `size` | `number` | `16` | Length of one tooth, wave or bump, in pixels. Each edge fits a whole number of them, so the real length is the closest that divides it. | | `depth` | `number` | `8` | How far the pattern reaches in from the edge, in pixels. | Also accepts line, fill, color and every div attribute. --- # Stamp > A postage stamp: round bites out of all four edges. - Category: Shapes (Outlines that are not rectangles, with borders that follow them.) - Registry item: `edge-frame` — Stamp is a recipe: a few layers of `edge-frame` put together, not an item of its own. Install `edge-frame` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/stamp ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/edge-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/edge-frame`. The CLI also adds what `edge-frame` is built on: `frame`, `shape-frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/shape-frame.tsx`, `components/edge-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { EdgeFrame } from "@/components/edge-frame"; Your picture ``` ## API reference ### EdgeFrame ```tsx import { EdgeFrame } from "@/components/edge-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `edge` | `"zigzag" \| "wave" \| "scallop" \| "bite"` | `"zigzag"` | The pattern cut into the edges: zigzag teeth, a wave, a scallop of round bumps, or round bites like the edge of a stamp. | | `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `top and bottom` | Which edges get the pattern. | | `size` | `number` | `16` | Length of one tooth, wave or bump, in pixels. Each edge fits a whole number of them, so the real length is the closest that divides it. | | `depth` | `number` | `8` | How far the pattern reaches in from the edge, in pixels. | Also accepts line, fill, color and every div attribute. --- # Dash Patterns > Dashed lines with the dash and the gap set independently, which a CSS border cannot do. - Category: Lines (Line styles for any frame: dashes, native styles and motion.) - Registry item: `frame` — Dash Patterns is a recipe: a few layers of `frame` put together, not an item of its own. Install `frame` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/dash-patterns ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame`. Files it adds: `components/ui/frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame, FrameRules } from "@/components/ui/frame"; Content ``` ## Good to know - Rules are four straight lines, so they ignore the radius. For a dashed line that follows rounded corners use FrameBorder with the dashed variant. ## API reference ### FrameRules ```tsx import { FrameRules } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `all four` | Which sides get a line. | | `overshoot` | `number \| string \| { x?, y? }` | `0` | How far the lines run past the corners. x extends the horizontal lines, y the vertical ones. | | `dash` | `number \| string` | `4` | Dash length. Setting dash or gap makes the lines dashed. | | `gap` | `number \| string` | `4` | Space between dashes. | | `march` | `boolean \| number` | `false` | Make the dashes travel clockwise. A number is the seconds a dash takes to reach the next one's place; true is 0.6. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `color` | `string` | – | Overrides the frame's line colour for this layer. | Also accepts every div attribute, such as className and style. --- # Border Styles > Solid, dashed, dotted and double borders that follow the radius and can sit inside or outside the frame's edge. - Category: Lines (Line styles for any frame: dashes, native styles and motion.) - Registry item: `frame` — Border Styles is a recipe: a few layers of `frame` put together, not an item of its own. Install `frame` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/border-styles ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame`. Files it adds: `components/ui/frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame, FrameBorder } from "@/components/ui/frame"; Content ``` ## Good to know - A double border needs a line at least 3 pixels wide to show both lines. ## API reference ### FrameBorder ```tsx import { FrameBorder } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `variant` | `"solid" \| "dashed" \| "dotted" \| "double"` | `"solid"` | The CSS border style. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | | `color` | `string` | – | Overrides the frame's line colour for this layer. | Also accepts every div attribute, such as className and style. --- # Marching Ants > Dashed rules whose dashes travel around the frame, like a selection rectangle. - Category: Lines (Line styles for any frame: dashes, native styles and motion.) - Registry item: `frame` — Marching Ants is a recipe: a few layers of `frame` put together, not an item of its own. Install `frame` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/marching-ants ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame`. Files it adds: `components/ui/frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame, FrameCorners, FrameRules } from "@/components/ui/frame"; Content ``` ## Good to know - The dashes stand still for people who ask for reduced motion. ## API reference ### FrameRules ```tsx import { FrameRules } from "@/components/ui/frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `sides` | `("top" \| "right" \| "bottom" \| "left")[]` | `all four` | Which sides get a line. | | `overshoot` | `number \| string \| { x?, y? }` | `0` | How far the lines run past the corners. x extends the horizontal lines, y the vertical ones. | | `dash` | `number \| string` | `4` | Dash length. Setting dash or gap makes the lines dashed. | | `gap` | `number \| string` | `4` | Space between dashes. | | `march` | `boolean \| number` | `false` | Make the dashes travel clockwise. A number is the seconds a dash takes to reach the next one's place; true is 0.6. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `color` | `string` | – | Overrides the frame's line colour for this layer. | Also accepts every div attribute, such as className and style. --- # Beam > A light that travels the border at a steady speed, around any proportions and any corner. - Category: Effects (Gradient, glow and moving light, as more layers for a frame.) - Registry item: `beam-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/beam ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/beam-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/beam-frame`. The CLI also adds what `beam-frame` is built on: `frame`, `frame-effects`. Files it adds: `components/ui/frame.tsx`, `components/ui/frame-effects.tsx`, `components/beam-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { BeamFrame } from "@/components/beam-frame"; Your content ``` ## Examples ### On a shape Inside a shape frame the beam follows the shape's outline. ```tsx import { FrameBeam } from "@/components/ui/frame-effects"; import { ShapeFrame } from "@/components/ui/shape-frame"; export default function BeamShape() { return (

Around a notched frame

); } ``` ### Coloured by utilities Leave out the colours and the beam reads frame-from-* and frame-to-* from the frame. ```tsx import { BeamFrame } from "@/components/beam-frame"; export default function BeamUtilities() { return (

frame-from-slate-400

); } ``` ## Good to know - BeamFrame is a preset: a Frame with a FrameBorder and a FrameBeam. Use the FrameBeam layer directly, from frame-effects, to add a beam to any frame. - The beam follows the outline with offset-path, which needs Chromium 116, Firefox 122 or Safari 18. Without it nothing is drawn and the plain border remains. ## API reference ### BeamFrame ```tsx import { BeamFrame } from "@/components/beam-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | – | The beam's colours: the first for its head, the last for its tail. | | `size` | `number \| string` | `120` | Length of the beam. | | `duration` | `number \| string` | `6` | Time for one lap of the frame. Numbers are seconds. | | `count` | `number` | `1` | Number of beams, spaced evenly around the frame. | | `reverse` | `boolean` | `false` | Travel anticlockwise. | Also accepts every Frame prop and every div attribute. ### FrameBeam ```tsx import { FrameBeam } from "@/components/ui/frame-effects"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | – | The beam's colours: the first for its head, the last for its tail. Without them it reads frame-from-* and frame-to-*. | | `size` | `number \| string` | `120` | Length of the beam. | | `duration` | `number \| string` | `6` | Time for one lap of the frame. Numbers are seconds. | | `count` | `number` | `1` | Number of beams, spaced evenly around the frame. | | `reverse` | `boolean` | `false` | Travel anticlockwise. | | `bloom` | `number \| false` | `0.25` | Strength of the light the beam casts on either side of the line. false leaves only the line. | | `thickness` | `number \| string` | – | Line width, when different from the frame's. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | Also accepts every div attribute, such as className and style. --- # Glow > A gradient border with a halo of the same colours glowing behind it, still or turning. - Category: Effects (Gradient, glow and moving light, as more layers for a frame.) - Registry item: `glow-frame` - Live preview with controls: https://fancyborders.vercel.app/docs/components/glow ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/glow-frame.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/glow-frame`. The CLI also adds what `glow-frame` is built on: `frame`, `frame-effects`. Files it adds: `components/ui/frame.tsx`, `components/ui/frame-effects.tsx`, `components/glow-frame.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { GlowFrame } from "@/components/glow-frame"; Your content ``` ## Examples ### On a shape Inside a shape frame the halo is the whole shape blurred behind it, so give the shape a fill. ```tsx import { FrameGlow, FrameGradient } from "@/components/ui/frame-effects"; import { ShapeFrame } from "@/components/ui/shape-frame"; export default function GlowShape() { return (

Gradient and glow

); } ``` ## Good to know - GlowFrame is a preset: a Frame with a FrameGlow and a FrameGradient that share their colours. Both layers come from frame-effects. - The halo is painted behind the frame's content but in front of the frame's own background. ## API reference ### GlowFrame ```tsx import { GlowFrame } from "@/components/glow-frame"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | – | Colour stops shared by the border and the halo. | | `spin` | `boolean \| number` | `false` | Turn the colours around the frame. A number is the seconds one turn takes. | | `pulse` | `boolean \| number` | `false` | Make the halo breathe. A number is the seconds one breath in takes. | | `blur` | `number \| string` | `10` | Blur radius of the halo. | | `spread` | `number \| string` | `14` | Width of the band that is blurred. Wider is brighter. | Also accepts every Frame prop and every div attribute. ### FrameGlow ```tsx import { FrameGlow } from "@/components/ui/frame-effects"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | – | Colour stops, in order. Without them the layer reads the frame-from-*, frame-via-* and frame-to-* utilities. | | `gradient` | `string` | – | Any CSS image, in place of the gradient built from the colours. | | `angle` | `number \| string` | `135` | Direction of the gradient. Numbers are degrees. | | `spin` | `boolean \| number` | `false` | Turn the gradient around the frame. A number is the seconds one turn takes; true is 4. | | `pulse` | `boolean \| number` | `false` | Breathe in and out. A number is the seconds one breath in takes; true is 2.4. | | `blur` | `number \| string` | `10` | Blur radius of the halo. | | `spread` | `number \| string` | `14` | Width of the band that is blurred. Wider is brighter. | | `opacity` | `number` | `0.75` | Strength of the halo, from 0 to 1. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | Also accepts every div attribute, such as className and style. --- # Gradient > A gradient drawn on the frame's line, in any colours and at any angle, optionally turning around the frame. - Category: Effects (Gradient, glow and moving light, as more layers for a frame.) - Registry item: `frame-effects` - Live preview with controls: https://fancyborders.vercel.app/docs/components/gradient ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame-effects.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame-effects`. The CLI also adds what `frame-effects` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/frame-effects.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame } from "@/components/ui/frame"; import { FrameGradient } from "@/components/ui/frame-effects"; Your content ``` ## Examples ### Coloured by utilities frame-from-*, frame-via-* and frame-to-* on the frame colour every effect layer inside it. ```tsx import { Frame } from "@/components/ui/frame"; import { FrameGradient } from "@/components/ui/frame-effects"; export default function GradientUtilities() { return (

frame-via-indigo-300

); } ``` ### A turning comet Fade the gradient to transparent and spin it for a light that sweeps the border. ```tsx import { Frame, FrameBorder, FrameCorners } from "@/components/ui/frame"; import { FrameGradient } from "@/components/ui/frame-effects"; export default function GradientComet() { return (

spin

); } ``` ## API reference ### FrameGradient ```tsx import { FrameGradient } from "@/components/ui/frame-effects"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | – | Colour stops, in order. Without them the layer reads the frame-from-*, frame-via-* and frame-to-* utilities. | | `gradient` | `string` | – | Any CSS image, in place of the gradient built from the colours. | | `angle` | `number \| string` | `135` | Direction of the gradient. Numbers are degrees. | | `spin` | `boolean \| number` | `false` | Turn the gradient around the frame. A number is the seconds one turn takes; true is 4. | | `thickness` | `number \| string` | – | Line width, when different from the frame's. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | Also accepts every div attribute, such as className and style. --- # Pulse > A halo that breathes in and out, for something that is live, recording or waiting. - Category: Effects (Gradient, glow and moving light, as more layers for a frame.) - Registry item: `frame-effects` — Pulse is a recipe: a few layers of `frame-effects` put together, not an item of its own. Install `frame-effects` and copy the code below. - Live preview with controls: https://fancyborders.vercel.app/docs/components/pulse ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame-effects.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame-effects`. The CLI also adds what `frame-effects` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/frame-effects.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame } from "@/components/ui/frame"; import { FrameGlow, FrameGradient, } from "@/components/ui/frame-effects"; Recording ``` ## Good to know - The halo holds still for people who ask for reduced motion. ## API reference ### FrameGlow ```tsx import { FrameGlow } from "@/components/ui/frame-effects"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | – | Colour stops, in order. Without them the layer reads the frame-from-*, frame-via-* and frame-to-* utilities. | | `gradient` | `string` | – | Any CSS image, in place of the gradient built from the colours. | | `angle` | `number \| string` | `135` | Direction of the gradient. Numbers are degrees. | | `spin` | `boolean \| number` | `false` | Turn the gradient around the frame. A number is the seconds one turn takes; true is 4. | | `pulse` | `boolean \| number` | `false` | Breathe in and out. A number is the seconds one breath in takes; true is 2.4. | | `blur` | `number \| string` | `10` | Blur radius of the halo. | | `spread` | `number \| string` | `14` | Width of the band that is blurred. Wider is brighter. | | `opacity` | `number` | `0.75` | Strength of the halo, from 0 to 1. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | Also accepts every div attribute, such as className and style. ### FrameGradient ```tsx import { FrameGradient } from "@/components/ui/frame-effects"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | – | Colour stops, in order. Without them the layer reads the frame-from-*, frame-via-* and frame-to-* utilities. | | `gradient` | `string` | – | Any CSS image, in place of the gradient built from the colours. | | `angle` | `number \| string` | `135` | Direction of the gradient. Numbers are degrees. | | `spin` | `boolean \| number` | `false` | Turn the gradient around the frame. A number is the seconds one turn takes; true is 4. | | `thickness` | `number \| string` | – | Line width, when different from the frame's. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | Also accepts every div attribute, such as className and style. --- # Spotlight > Borders that light up near the pointer, across every frame on the page at once. - Category: Effects (Gradient, glow and moving light, as more layers for a frame.) - Registry item: `frame-spotlight` - Live preview with controls: https://fancyborders.vercel.app/docs/components/spotlight ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame-spotlight.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame-spotlight`. The CLI also adds what `frame-spotlight` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/frame-spotlight.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame, FrameBorder } from "@/components/ui/frame"; import { FrameSpotlight } from "@/components/ui/frame-spotlight"; Your content ``` ## Good to know - Every spotlight on the page shares one pointer listener, and updates at most once a frame. - This is a client component. Put it over a faint FrameBorder so the frame keeps an edge where the light does not reach. ## API reference ### FrameSpotlight ```tsx import { FrameSpotlight } from "@/components/ui/frame-spotlight"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `colors` | `string[]` | `the text colour` | Colour of the light, or two colours for its centre and its edge. | | `size` | `number \| string` | `220` | Radius of the light. | | `wash` | `boolean \| number` | `false` | Also wash the frame's surface with the light. A number is the wash's strength; true is 0.08. | | `thickness` | `number \| string` | – | Line width, when different from the frame's. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | Also accepts every div attribute, such as className and style. --- # Liquid Metal > A moving metal ring drawn with WebGL, in chromatic, silver and gold. - Category: Effects (Gradient, glow and moving light, as more layers for a frame.) - Registry item: `frame-metal` - Live preview with controls: https://fancyborders.vercel.app/docs/components/liquid-metal ## Installation ```bash npx shadcn@latest add https://fancyborders.vercel.app/r/frame-metal.json ``` With the registry namespace: `npx shadcn@latest add @fancyborders/frame-metal`. The CLI also adds what `frame-metal` is built on: `frame`. Files it adds: `components/ui/frame.tsx`, `components/ui/frame-metal.tsx`, and its CSS goes into the global stylesheet after the Tailwind import. ## Usage The code for the preview at its default settings: ```tsx import { Frame } from "@/components/ui/frame"; import { FrameMetal } from "@/components/ui/frame-metal"; Upgrade to Pro ``` ## Good to know - Every metal layer on the page shares one WebGL context and one animation loop, and layers scrolled out of view are skipped. - The metal is laid over the frame's ordinary line colour and is see-through where it has nothing to add, so the frame keeps a continuous edge. Without WebGL that plain line is all there is. - This is a client component. The shader is adapted from metal-fx by Jakub Antalik, under the MIT License. ## API reference ### FrameMetal ```tsx import { FrameMetal } from "@/components/ui/frame-metal"; ``` | Prop | Type | Default | Description | | --- | --- | --- | --- | | `preset` | `"chromatic" \| "silver" \| "gold"` | `"chromatic"` | The finish. | | `theme` | `"dark" \| "light" \| "auto"` | `"auto"` | Which palette to use: the one tuned for dark surfaces or for light ones. auto follows the page's color-scheme (set by most theme switchers), and the system's when the page sets none. | | `scale` | `number` | `1` | Size of the pattern. 2 doubles it, 0.5 halves it. | | `speed` | `number` | `1` | Speed of the motion. 0.5 is half speed. | | `paused` | `boolean` | `false` | Hold the metal still on its current frame. | | `thickness` | `number \| string` | – | Line width, when different from the frame's. | | `offset` | `number \| string` | `0` | Distance from the frame's edge. Positive is outward, negative inward. | | `radius` | `number \| string` | – | Overrides the frame's radius for this layer. | Also accepts every div attribute, such as className and style.