Skip to content
Ballpoint

Frame

A photo frame ruled round a picture, each side pulled past the corners and gone over again, with a caption written underneath.

Only in Ballpoint
A doodled portrait
Drawn on a Tuesday

Installation

pnpm dlx shadcn@latest add @ballpoint/frame

Usage

tsx
import { Frame } from "@/components/ui/frame"

<Frame caption="Drawn on a Tuesday">
  <img src="/portrait.jpg" alt="Me, at my desk" className="size-40" />
</Frame>

Examples

The more passes, the more it looks gone over.

A doodled portrait
One pass
A doodled portrait
Two passes
A doodled portrait
Three passes

Taped and tilted

Hold the picture down with tape and set it a little askew, the way you would pin a photo to a page.

A doodled portrait
Taped, a little askew
The same doodle, framed wider
Dropped the other way

API reference

caption
ReactNode

Written under the frame, as the figure's caption.

gap
default 6
number

px between the picture and the frame.

tilt
default 0
number

Degrees to turn the frame, as if it were dropped there.

tape
default false
boolean

A strip of washi tape across the top.

seed
string | number

Pins the drawing.

Pen settings

The drawing also takes draw, roughness, passes, weight and speed, as props or from the nearest InkProvider. What each one does.