Components

React component for shadcn/ui

Scribbled Text

Mark inline text with colorful hand-drawn annotations.

Loading…

Scribbled Text is a free, source-available React annotation component for shadcn/ui that marks inline text with twelve hand-drawn SVG underlines, highlights, enclosures, and strikeouts that draw in on scroll. Install it with npx shadcn@latest add @tentui/scribbled-text.

Playground

Loading…

Features

  • Includes twelve underline, highlight, enclosure, and cancellation marks.
  • Inherits typography and text color from the surrounding content.
  • Draws each annotation once when it enters the viewport.

Installation

pnpm dlx shadcn@latest add @tentui/scribbled-text

Usage

import { ScribbledText } from "@/components/scribbled-text";
<p>
  This detail is <ScribbledText variant="circle">important</ScribbledText>.
</p>

Each phrase stays on one line so its mark remains aligned. Keep annotated phrases short enough to fit their container.

Customize the mark without changing the surrounding text styles.

<ScribbledText variant="arrowUnderline" scribbleClassName="text-rose-400">
  Read the announcement
</ScribbledText>

Render a complete mark without the drawing animation.

<ScribbledText variant="box" animated={false}>
  Always visible
</ScribbledText>

Accessibility

Scribble graphics are hidden from assistive technology, leaving the wrapped text unchanged. The component is visual-only; use semantic elements such as mark or del when the annotation conveys meaning.

With reduced motion enabled, every annotation renders complete without its drawing animation.

API reference

PropType

Examples

Use the variant prop to choose a hand-drawn mark.

Wavy underline

Loading…

Circle

Loading…

Highlight

Loading…

Underline

Loading…

Straight underline

Loading…

Dotted underline

Loading…

Double underline

Loading…

Strikethrough

Loading…

Cross out

Loading…

Arrow underline

Loading…

Bracket

Loading…

Box

Loading…

FAQ

How do I install the Scribbled Text with shadcn?

Run npx shadcn@latest add @tentui/scribbled-text after adding the @tentui registry to components.json (installation guide), or run npx shadcn@latest add https://tentui.com/r/scribbled-text.json without it. The CLI copies scribbled-text.tsx into your project and installs motion.

Which hand-drawn annotations are included, and can I change their color?

Twelve variant values: wavyUnderline (the default), underline, straightUnderline, dottedUnderline, doubleUnderline, arrowUnderline, highlight, circle, box, bracket, strikethrough, and crossOut. Each has its own default color; pass a text color class to scribbleClassName, such as text-rose-400, to recolor only the mark.

When does the scribble animation play?

Once, when the text scrolls into view, and it doesn't replay after that. Set animated={false} to render the mark already drawn; it also renders complete when the user prefers reduced motion.

Why doesn't the annotated phrase wrap onto a second line?

The component keeps the phrase on one line so the mark stays aligned with it. Wrap a short phrase rather than a whole sentence, and it inherits the surrounding font size, weight, and color.

Is Scribbled Text accessible?

The marks are decorative SVGs hidden from screen readers, so the text reads as it would without them. When an annotation carries meaning, wrap the text in a semantic element such as mark or del as well.

Is Scribbled Text free to use?

Yes. Scribbled Text is free and source-available: the shadcn CLI copies its source into your project, and you can use it in unlimited personal and client projects under the TentUI License. The license doesn't allow redistributing or reselling the component itself.

All text and visual effects
All guides