Highlighter

Adds hand-drawn-style annotations like highlights, underlines, and circles to text using Rough Notation.

uimotionrough-notation

Installation

$npx futureuikit add highlighter

Import

import { Highlighter } from "@/components/ui/highlighter"
Layout Variant
Color Theme

Named Keys & Props

Pass these exact named keys as props on <Highlighter />. Click any color pill to copy the prop.

colorDefault is "default"(Black & White)
Also supports customColor="#hex"
spacingInner spacing
"default""2x""4x""6x""8x"

Usage Example

A basic implementation example to get you started.

Example Implementation
import { Highlighter } from "@/components/ui/highlighter";

export default function Example() {
  return (
    <p>
      This is a <Highlighter action="highlight" color="amber">highlighted</Highlighter> word.
    </p>
  );
}

Features

Key capabilities and highlights.

Key Capabilities
  • ◆Supports multiple annotation types including highlight, underline, circle, and box.
  • ◆Configurable colors, durations, and animation settings.
  • ◆Leverages the Rough Notation library for a natural, sketched feel.

Notes

Important implementation details to consider.

Implementation Details
  • ◆Install: Run 'npx futureuikit add highlighter'.
  • ◆Import: 'import { Highlighter } from "@/components/ui/highlighter";'
  • ◆Usage: Wrap any inline text and set 'action' ('highlight', 'underline', 'box', 'circle', 'strike-through', 'crossed-off', 'bracket') and a named 'color' key ('default', 'blue', 'emerald', 'rose', 'amber', 'violet', 'indigo', 'sky', 'slate', 'orange') or 'customColor'.