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

    701
  • Glow Effect

    Glow Effect

    625
  • Tailwind CSS Background Snippet

    Tailwind CSS Background Snippet

    597

More in Text

View all
  • Vertical Cut Reveal Characters

    Vertical Cut Reveal Characters

    125
  • Motion Blur Text

    Motion Blur Text

    42
  • Text Reveal

    Text Reveal

    29
  • Shine Border

    Shine Border

    987
  • Rainbow Text Effect

    Rainbow Text Effect

    55
  • Blur Reveal

    Blur Reveal

    344
  • Apple Hello Effect

    Apple Hello Effect

    646
  • Vapour Text Effect

    Vapour Text Effect

    2K