byDefaultHuman
Primitives

RoughHighlight

Wrap any text with a hand-drawn annotation.

This is

highlighted

text with a rough annotation.

Installation

package manager
npx shadcn add https://bydefaulthuman.fun/r/rough-highlight.json

Props

PropTypeDefaultDescription
animate
boolean
—
Controls the `animate` behavior.
animationDuration
number
—
Controls the `animationDuration` behavior.
children*
ReactNode
—
Content rendered inside the component.
className
string
—
Additional Tailwind classes applied to the component.
color
string
—
Overrides the sketch color.
id
string
—
Controls the `id` behavior.
opacity
number
—
Controls the SVG opacity.
style
CSSProperties
—
Inline styles applied to the wrapper.
theme
CrumbleTheme
—
Overrides the global Crumble theme for this instance.
type
HighlightType
—
Controls the visual variant.

All types

Underline

Box

Circle

Highlight

Accessibility

This primitive is primarily presentational. Keep the underlying content semantic and avoid relying on the sketch overlay alone to communicate meaning.

Examples

import { RoughHighlight } from "@/components/crumble/primitives/rough-highlight";

<p>
  This is{" "}
  <RoughHighlight type="highlight" color="#fbbf24">
    highlighted
  </RoughHighlight>{" "}
  text.
</p>;