Skip to content
Textlab
1
Browse

ComponentsDraw

Circle annotate

A pen circles the word that matters.

The only plan that scales with you

Installation

$ npx shadcn@latest add @textlab/circle-annotate

Needs @textlab in your components.json. Setup takes a minute.

Usage

usage.tsx
import { CircleAnnotate } from "@/components/textlab/circle-annotate/circle-annotate";

<p>The only plan that <CircleAnnotate>scales</CircleAnnotate> with you</p>

Variants

circleboxbracket

Props

PropTypeDefaultDescription
children*ReactNode–The word or phrase to mark.
variant"circle" | "box" | "bracket""circle"Loop around it, frame it, or bracket it.
colorstringvar(--tl-accent)Pen color.
thicknessnumber2.5Stroke width in px.
paddingnumber0.25Room around the word in em.
asElementType"span"Rendered element.
trigger"mount" | "inView" | "hover" | "manual""inView"What starts the animation. manual follows `active`.
activebooleanfalseDrives trigger="manual".
oncebooleantrueIn view: play once instead of on every entry.
delaynumber0Seconds before the first part moves.
durationnumber0.9Seconds each part takes.
reducedMotion"user" | "always" | "never""user"user follows the OS setting; always shows the still version.
classNamestring–Merged onto the root.

When to use it

Reach for it

  • Pointing at the one word that sells the sentence.
  • Pricing tiers, comparisons and testimonials.

Skip it

  • Several marks in one view; each one weakens the others.
  • Buttons and links.

Accessibility and motion

Accessibility

  • Decorative SVG; the text is untouched.
  • Add <strong> or <mark> if the emphasis must be conveyed to assistive tech.

Motion

  • One continuous stroke with an overshoot, drawn with the standard ease.
Reduced motion. The mark is drawn from the start.

Performance

  • One SVG path animated with pathLength.