Skip to content

    Browse components

    Text Modifier

    Hand-drawn pen annotations (circles, underlines, boxes, strikes and crosses) that sketch themselves around words.

    Open
    Customize
    circle
    underline
    box
    strike
    cross

    Installation

    npx shadcn@latest add @glint-ui/text-modifier

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/text-modifier.json

    Usage

    import { TextModifier } from "@/components/ui/text-modifier";
    
    <p>Make it <TextModifier action="circle">pop</TextModifier>.</p>

    Props

    PropTypeDefaultDescription
    childrenReactNode—The words to annotate.
    action"circle" | "underline" | "box" | "strike" | "cross""circle"Annotation to draw.
    colorstring"#fb7185"Pen color.
    strokeWidthnumber3Pen width, in px.
    paddingnumber8Space between the text and the annotation, in px.
    durationnumber900Draw duration, in ms.
    delaynumber0Delay after entering view, in ms.
    seednumber3Changes the hand-drawn wobble.
    classNamestring—Extra classes for the root element.