npx shadcn@latest add https://components.bksh.site/r/sketch-border.json

Hand Drawn

Sketch Border

A hand-drawn border that boils — redrawn a few times a second.

Hand drawn
Example.tsx
import { SketchBorder } from "@/components/better/sketch-border"
export function Example() {
return (
<SketchBorder color="#6366f1" strokeWidth={2} roughness={4} radius={10}>
<span className="px-4 py-2 text-lg font-medium">Hand drawn</span>
</SketchBorder>
)
}

Dependencies

None — just React and Tailwind CSS.

Props

PropTypeDefaultDescription
children*ReactNode
classNamestring
colorstring"currentColor"Border color (any CSS color).
strokeWidthnumber2Stroke thickness in px.
roughnessnumber4How wobbly the line is.
fpsnumber4Redraws (re-seeds) per second — the classic "line boil".
radiusnumber10Corner radius of the underlying rect.