New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

react-animated-highlighter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-animated-highlighter

Animated text highlighter component for React with GSAP animations

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
7
600%
Maintainers
1
Weekly downloads
 
Created
Source

React Animated Highlighter

An animated text highlighter component for React with smooth GSAP animations. Perfect for hero sections, landing pages, and attention-grabbing text effects.

Demo

npm version

Features

  • Smooth GSAP-powered animations
  • Highlighter icon that "draws" across your text
  • Fully customizable colors, timing, and opacity
  • Replay animation on hover option
  • TypeScript support
  • Zero external icon dependencies

Installation

npm install react-animated-highlighter gsap

Quick Start

import { AnimatedHighlighter } from 'react-animated-highlighter';

function App() {
  return (
    <h1>
      Welcome to <AnimatedHighlighter text="My Website" />
    </h1>
  );
}

Props

PropTypeDefaultDescription
textstringrequiredThe text to highlight
colorstring'#6ca0dc'Highlight color
fontSizestring'30px'Font size of the text
classNamestring''Additional CSS class
showIconbooleantrueShow the highlighter icon during animation
highlightOpacitynumber0.3Opacity of the highlight (0-1)
durationnumber1.5Animation duration in seconds
delaynumber0Delay before animation starts
replayOnHoverbooleanfalseReplay the animation on hover

Examples

Custom Color

<AnimatedHighlighter
  text="Important!"
  color="#f59e0b"
/>

Slower Animation

<AnimatedHighlighter
  text="Take your time"
  duration={3}
  delay={0.5}
/>

No Icon, Just Highlight

<AnimatedHighlighter
  text="Subtle highlight"
  showIcon={false}
  highlightOpacity={0.2}
/>

Interactive (Replay on Hover)

<AnimatedHighlighter
  text="Hover me!"
  replayOnHover={true}
/>

Hero Section Example

<h1 className="text-5xl font-bold">
  Ship products with{' '}
  <AnimatedHighlighter
    text="zero friction"
    color="#10b981"
    fontSize="inherit"
    duration={2}
  />
</h1>

Color Ideas

ColorHexUse Case
Blue#6ca0dcDefault, professional
Emerald#10b981Success, growth
Amber#f59e0bWarning, attention
Rose#f43f5eImportant, urgent
Purple#8b5cf6Creative, premium

Requirements

  • React 17+
  • GSAP 3+ (peer dependency)

AI Assistant Integration

This package includes a CLAUDE.md file with detailed instructions for AI coding assistants (Claude, GPT, Copilot, etc.). When you ask an AI to integrate this package into your project, it can read these instructions to provide accurate, copy-paste ready code.

The AI instructions cover:

  • Quick setup examples
  • All props with descriptions
  • Integration with Framer Motion
  • Recommended color palettes
  • Common patterns for hero sections, landing pages, etc.

License

MIT © Ben Jammin

Keywords

react

FAQs

Package last updated on 31 Dec 2025

Related posts