Introduction

fancyborders is a collection of borders, frames and enclosures for React and Tailwind CSS. It is free and open source, and you copy the code into your project rather than installing 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";

<Frame className="p-6">
  <FrameFill pattern="grid" size={16} />
  <FrameRules overshoot={10} />
  <FrameCorners mark="plus" />
  Content
</Frame>

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";

<BracketFrame className="p-5">
  <Card />
</BracketFrame>

Quick start

In a project that uses React, Tailwind CSS v4 and the shadcn CLI, add any component with one command:

npx shadcn@latest add https://fancyborders.vercel.app/r/bracket-frame.json

Installation covers setting up a new project and installing by hand.

What is here

Principles

  • Yours to edit. The CLI copies source into your project. There is no package to update and nothing hidden.
  • Tailwind first. Colour, line width and radius are utilities, so they take variants like hover and dark.
  • CSS where possible. Most components are plain CSS and render on the server. The two that need the browser are separate client components.
  • Respectful motion. Every animation stops for people who ask for reduced motion.