Skip to content
Ballpoint

Alert

A note boxed off from the page; the destructive one in red pen.

From shadcn/ui

Installation

pnpm dlx shadcn@latest add @ballpoint/alert

Usage

tsx
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"

<Alert variant="destructive">
  <AlertTitle>The page couldn't be saved</AlertTitle>
  <AlertDescription>The connection dropped halfway.</AlertDescription>
</Alert>

Examples

Without an icon

Title only, description only, and with an action.

Variants

Pencil, a hatched note, and red pen, each with its glyph.

Dismissible

An action in the corner closes the note, and brings it back.

API reference

variant
default "default"
"default" | "note" | "destructive"

Pencil, hatched lightly across like a margin highlight, or red pen.

fill
"hatch" | "flat"

How the note variant is coloured in: hatching, or a flat wash.

seed
string | number

Pins the drawing.

Pen settings

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