Blur Highlight
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Customize
Props
| Property | Type | Default | Description |
|---|---|---|---|
text | string | "Our cutting-edge technology..." | Display text to animate (passed as children in JSX). |
mode | string | "wipe" | Animation style: "wipe" | "slide" | "curtain" | "blinds" | "fade" | "highlight". |
direction | string | "left" | Direction the mask exits or the highlight pill grows from: "left" | "right" | "top" | "bottom". |
method | string | "word" | Split granularity for non-highlight modes: "word" (each word masked separately) or "whole" (single mask for the full text). |
highlightedBits | string[] | [] | Only used when mode="highlight". Exact phrases to wrap in an animated rounded pill. |
revealDuration | number | 0.6 | Duration (s) of each chunk/pill reveal animation. |
revealDelay | number | 0 | Delay (s) before the reveal animation starts. |
staggerAmount | number | auto (0.4–0.7) | Total time (s) spread across all chunks/pills; leave unset for automatic stagger based on chunk count. |
ease | string | "circ.inOut" | GSAP ease string, e.g. "circ.inOut", "power2.out", "back.out(1.7)". |
maskColor | string | "#49A078" | CSS color for the mask / highlight pill, e.g. "#7C3AED" or "crimson". |
textColor | string | "inherit" | CSS color applied to the revealed text. |
as | string | "p" | HTML tag to render: "h1" | "h2" | "h3" | "p" | "span". |
once | boolean | true | If true, animates only the first time it enters the viewport. If false, resets and re-animates every time (highlight mode only). |
amount | number | 1 | Fraction of the element that must be visible (0–1) before the animation triggers. |
rootMargin | string | "0px 0px -120px 0px" | IntersectionObserver root margin, shifts when the trigger point fires relative to the viewport edge. |
className | string | "" | Extra classes applied to the root wrapper element. |
textstringDisplay text to animate (passed as children in JSX).
"Our cutting-edge technology..."modestringAnimation style: "wipe" | "slide" | "curtain" | "blinds" | "fade" | "highlight".
"wipe"directionstringDirection the mask exits or the highlight pill grows from: "left" | "right" | "top" | "bottom".
"left"methodstringSplit granularity for non-highlight modes: "word" (each word masked separately) or "whole" (single mask for the full text).
"word"highlightedBitsstring[]Only used when mode="highlight". Exact phrases to wrap in an animated rounded pill.
[]revealDurationnumberDuration (s) of each chunk/pill reveal animation.
0.6revealDelaynumberDelay (s) before the reveal animation starts.
0staggerAmountnumberTotal time (s) spread across all chunks/pills; leave unset for automatic stagger based on chunk count.
auto (0.4–0.7)easestringGSAP ease string, e.g. "circ.inOut", "power2.out", "back.out(1.7)".
"circ.inOut"maskColorstringCSS color for the mask / highlight pill, e.g. "#7C3AED" or "crimson".
"#49A078"textColorstringCSS color applied to the revealed text.
"inherit"asstringHTML tag to render: "h1" | "h2" | "h3" | "p" | "span".
"p"oncebooleanIf true, animates only the first time it enters the viewport. If false, resets and re-animates every time (highlight mode only).
trueamountnumberFraction of the element that must be visible (0–1) before the animation triggers.
1rootMarginstringIntersectionObserver root margin, shifts when the trigger point fires relative to the viewport edge.
"0px 0px -120px 0px"classNamestringExtra classes applied to the root wrapper element.
""Dependencies
Crafted withbyMohammad Tasin
