Skip to content
Ballpoint

Button

A pen-drawn box that lifts off a hatched shadow. Solid, outline, secondary, ghost, destructive and link.

From shadcn/ui
Built on Base UI Button

Installation

pnpm dlx shadcn@latest add @ballpoint/button

Usage

tsx
import { Button } from "@/components/ui/button"

export function Actions() {
  return (
    <>
      <Button>Book a call</Button>
      <Button variant="outline">Copy email</Button>
    </>
  )
}

Examples

Pen settings

Corners, roughness, weight, fills and shadows, per button or for a whole group with InkProvider.

With icons

Icons sit beside the label, or stand alone in the icon sizes.

Loading

Disable the button while it works and show a spinning loop; the label says what is happening.

Render the button's drawing on an <a> with render and nativeButton={false}.

Form actions

Cancel, save and publish in order of weight; a destructive choice beside a quiet alternative.

Delete this notebook for good?

API reference

variant
default "default"
"default" | "outline" | "secondary" | "ghost" | "destructive" | "link"

Shaded solid, boxed, hatched, drawn on hover, red pen, or underlined.

size
default "default"
"default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg"

Height and type size. Icon sizes are square.

seed
string | number

Pins the drawing. By default each button gets its own wobble, stable between server and client.

Every other prop goes to Base UI's Button.

Pen settings

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