byDefaultHuman
Components

Annotation

Wrap any element with a hand-drawn annotation that draws itself on mount.


Basic

Annotated text

Installation

package manager
npx shadcn add https://bydefaulthuman.fun/r/annotation.json

Props

PropTypeDefaultDescription
animate
boolean
true
Controls the `animate` behavior.
animationDelay
number
0
Animation delay in milliseconds.
animationDuration
number
Animation duration in milliseconds.
brackets
BracketSide | BracketSide[]
Bracket sides drawn when using bracket annotations.
color
string
"currentColor"
Overrides the main accent or stroke color.
iterations
number
Number of sketch passes used by the annotation.
label
ReactNode
Optional label text shown with the component.
labelSide
AnnotationSide
"top"
Controls the `labelSide` behavior.
multiline
boolean
false
Handles wrapped text as multiple annotation lines.
padding
number | [number, number] | [number, number, number, number]
5
Adds padding around the component content.
show
boolean
Controls the `show` behavior.
strokeWidth
number
Controls the `strokeWidth` behavior.
theme
CrumbleTheme
Overrides the global Crumble theme for this instance.
trigger
AnnotationTrigger
"inView" | "hover" | "mount".
Controls when the annotation is shown.
type
AnnotationType
Controls the visual variant or drawing style.

Types

BoxCircleUnderlineHighlightStrikeCrossedBracket

Labels

Key featureImportant

Trigger: Hover

Hover me

Trigger: In View

Scroll into view

Animation Control

Slow animation

Disable Animation

Static annotation

Multiline

This is a long text that wraps across multiple lines and still gets annotated correctly.


Custom Color

Coral box

In a Paragraph

The most

important thing

is to ship.


Accessibility

Annotation adds emphasis around existing text but does not change the underlying semantics. Do not use the annotation stroke as the only way to communicate importance or status.

Examples

import { Annotation } from "@/components/crumble/ui/annotation";

<Annotation type="box">
  <span className="text-base font-medium">Annotated text</span>
</Annotation>;