Julien Thibeaut

Spinning Text

Text 163

About

Easily animate text circularly. Customize the animation with variants and transitions.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Spinning Text to your project and fits it to your theme.

Code

How Spinning Text is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import React from "react";
import { SpinningText } from "@/components/ui/spinning-text";

function SpinningTextBasic() {
  return (
    <SpinningText
      radius={5}
      fontSize={1.2}
      className="font-medium leading-none"
    >
      {`pre-order • pre-order • pre-order • `}
    </SpinningText>
  );
}

function SpinningTextCustomTransition() {
  return (
    <SpinningText
      radius={7}
      fontSize={1}
      duration={6}
      transition={{ ease: "easeInOut", repeat: Infinity }}
      className="font-mono"
    >
      {`motion-primitives • motion-primitives • `}
    </SpinningText>
  );
}

function SpinningTextCustomVariants() {
  return (
    <SpinningText
      radius={5.5}
      fontSize={1}
      variants={{
        container: {
          hidden: {
            opacity: 1,
          },
          visible: {
            opacity: 1,
            rotate: 360,
            transition: {
              type: "spring",
              bounce: 0,
              duration: 6,
              repeat: Infinity,
              staggerChildren: 0.03,
            },
          },
        },
        item: {
          hidden: {
            opacity: 0,
            filter: "blur(4px)",
          },
          visible: {
            opacity: 1,
            filter: "blur(0px)",
          },
        },
      }}
      className="font-[450]"
    >
      {`pre-order • pre-order • pre-order • `}
    </SpinningText>
  );
}

export { SpinningTextBasic, SpinningTextCustomTransition, SpinningTextCustomVariants };

Dependencies

More by Julien Thibeaut

View all
  • Dock

    Dock

    3.2K
  • Text Effect

    Text Effect

    1.7K
  • Infinite Slider

    Infinite Slider

    1.5K
  • Text Shimmer

    Text Shimmer

    1.3K
  • Text Scramble

    Text Scramble

    1.1K
  • Progressive blur

    Progressive blur

    697
  • Glow Effect

    Glow Effect

    623
  • Tailwind CSS Background Snippet

    Tailwind CSS Background Snippet

    591

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    124
  • NeonRGBTextEffect

    NeonRGBTextEffect

    152
  • Text Reveal

    Text Reveal

    27
  • Blur Reveal

    Blur Reveal

    339
  • Word Rotate

    Word Rotate

    65
  • Spring Scale In

    Spring Scale In

    10
  • Motion Blur Text

    Motion Blur Text

    41
  • Text Highlight

    Text Highlight

    85