Introducing Magic UI Pro - 50+ blocks and templates to build beautiful landing pages in minutes.


Docs
Animated Shiny Text

Animated Shiny Text

A light glare effect which pans across text making it appear as if it is shimmering.

✨ Introducing Magic UI

Installation

Run the following command:

npx magicui-cli add animated-shiny-text

Update tailwind.config.js

Add the following animations to your tailwind.config.js file:

tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      animation: {
        shimmer: "shimmer 8s infinite",
      },
      keyframes: {
        shimmer: {
          "0%, 90%, 100%": {
            "background-position": "calc(-100% - var(--shimmer-width)) 0",
          },
          "30%, 60%": {
            "background-position": "calc(100% + var(--shimmer-width)) 0",
          },
        },
      },
    },
  },
};

Props

PropTypeDescriptionDefault
childrenThe text to be shimmered.
classNamestringThe class name to be applied to the shimmer.
shimmerWidthnumberThe width of the shimmer in pixels.100