- Docs
- Components
- Text
- Blur Highlight
A paragraph that blurs in and highlights key phrases
| Name | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | Text content to display |
highlightedBits | (string | HighlightBit)[] | [] | Array of text strings or objects to highlight. Use string for all occurrences, or { text: string, occurrence: number } for specific ones. |
highlightColor | string | "hsl(80, 100%, 50%)" | Color for highlighted text (any CSS color) |
highlightClassName | string | "" | Additional class name for highlighted text elements |
blurAmount | number | 8 | Initial blur amount in pixels |
inactiveOpacity | number | 0.3 | Opacity when not in view |
blurDelay | number | 0 | Blur animation delay in seconds |
blurDuration | number | 0.8 | Blur animation duration in seconds |
highlightDelay | number | 0.4 | Highlight animation delay in seconds |
highlightDuration | number | 1 | Highlight animation duration in seconds |
highlightDirection | "left" | "right" | "top" | "bottom" | "left" | Direction of highlight animation |
viewportOptions | { once?: boolean; amount?: number } | { once: false, amount: 0.5 } | Viewport intersection observer options (margin is fixed at -20%) |
className | string | "" | Additional CSS classes |
childrenReact.ReactNodeText content to display
-highlightedBits(string | HighlightBit)[]Array of text strings or objects to highlight. Use string for all occurrences, or { text: string, occurrence: number } for specific ones.
[]highlightColorstringColor for highlighted text (any CSS color)
"hsl(80, 100%, 50%)"highlightClassNamestringAdditional class name for highlighted text elements
""blurAmountnumberInitial blur amount in pixels
8inactiveOpacitynumberOpacity when not in view
0.3blurDelaynumberBlur animation delay in seconds
0blurDurationnumberBlur animation duration in seconds
0.8highlightDelaynumberHighlight animation delay in seconds
0.4highlightDurationnumberHighlight animation duration in seconds
1highlightDirection"left" | "right" | "top" | "bottom"Direction of highlight animation
"left"viewportOptions{ once?: boolean; amount?: number }Viewport intersection observer options (margin is fixed at -20%)
{ once: false, amount: 0.5 }classNamestringAdditional CSS classes
""