Spell UI: Free Animated React & Tailwind CSS UI Component Library

An open-source React UI component library for adding motion to marketing websites, portfolios, and apps.

Spell UI is a React and Tailwind CSS UI component library that adds animated text, interactive controls, and WebGL backgrounds to landing pages, portfolios, and web apps.

You can install 30+ components individually through shadcn and customize their TypeScript source.

Features

  • Character-level and word-level animations with adjustable timing and viewport triggers.
  • Motion-powered transitions and spring animations.
  • Dark-mode styles for badges and clipboard buttons.
  • WebGL effects with configurable colors and animation speeds.
  • AI-assisted component installation through the shadcn MCP server.

Use Cases

  • Build a SaaS launch page with an animated headline, a scrolling strip of customer logos, and an interactive call to action.
  • Add book previews and Spotify track cards to a creator’s personal website.
  • Create a developer documentation page with copyable terminal commands and keyboard shortcut labels.
  • Display trends and loading states in a product analytics dashboard.

Available UI Components

ComponentDescription
Components
ChartInteractive line chart with point snapping, a moving tooltip, and X-axis labels.
Perspective Book3D book mockup with an animated hover effect.
BadgeStatus labels with configurable sizes and colors.
Keyboard ShortcutsDisplays shortcut keys with keyboard symbols.
MarqueeContinuously scrolls content horizontally or vertically.
TweetEmbeds X posts with custom styling.
Spotify CardDisplays track information, album art, and audio previews when available.
Logos CarouselCycles through groups of logos with staggered transitions.
QR CodeGenerates QR codes with dotted modules and rounded corner markers.
Fallback AvatarGenerates a gradient avatar from a name.
Text Animations
Blur RevealBrings individual characters into focus with an animated reveal.
Special TextScrambles characters as part of a text animation.
Shimmer TextMoves a shimmering highlight across text.
Highlighted TextAnimates a sliding highlight behind text.
Slide Up TextReveals text with staggered upward motion.
Text MarqueeScrolls text vertically.
Words StaggerReveals successive words with blur and opacity transitions.
SignatureAnimates a handwritten signature from font glyphs.
Randomized TextReveals words or characters in randomized order.
Gradient Wave TextAnimates a wave of gradient colors across text.
Buttons
Rich ButtonStyled button with multiple color variants.
Flow ButtonAnimated dashed border on hover.
Copy ButtonClipboard button with an animated feedback icon.
Pop ButtonRaised button with a 3D press effect.
Inputs
Color SelectorInteractive color picker.
Label InputFloating-label input with a password visibility toggle.
Animated CheckboxSpring-animated checkbox with a strike-through effect on its label.
Exploding InputCreates particles as the user types.
Feedback
SpinnerLoading indicator with adjustable size and color.
Bars SpinnerLoading indicator with rotating bars.
Backgrounds
Light RaysAnimated WebGL light beams.
Animated GradientWebGL gradient with presets and adjustable swirl effects.
Interactive
Tilt Card3D card that responds to pointer movement with tilt and spotlight effects.

How to Use Spell UI

1. Initialize shadcn/ui

The following examples use Next.js, TypeScript, and Tailwind CSS 4. Run this command in your project if you haven’t initialized shadcn/ui yet:

npx shadcn@latest init

2. Register Spell UI

Add @spell to the registries object in components.json.

{
  "registries": {
    "@spell": "https://spell.sh/r/{name}.json"
  }
}

3. Install Blur Reveal

npx shadcn@latest add @spell/blur-reveal

4. Basic Usage

The CLI places these components at your aliases.components path. With the @/components alias, import Blur Reveal into your Next.js homepage (app/page.tsx or src/app/page.tsx):

import { BlurReveal } from "@/components/blur-reveal";
export default function HomePage() {
  return (
    <main className="mx-auto max-w-4xl px-6 py-24">
      <BlurReveal
        as="h1"
        className="text-4xl font-semibold tracking-tight md:text-6xl"
        speedReveal={2}
      >
        Create and share your best work.
      </BlurReveal>
    </main>
  );
}

Advanced Example: Copyable Install Command

npx shadcn@latest add @spell/copy-button

Create app/install/page.tsx (or src/app/install/page.tsx) to display a command with a copy-to-clipboard button at /install:

import { CopyButton } from "@/components/copy-button";
export default function InstallPage() {
  const command = "npx shadcn@latest add @spell/blur-reveal";
  return (
    <div className="flex items-center gap-4 rounded-lg border p-3">
      <code className="min-w-0 flex-1 overflow-x-auto text-sm">
        {command}
      </code>
      <CopyButton value={command} size="sm" />
    </div>
  );
}

Manual Installation and Customization

For manual installation, copy the TSX source from each component page into your components directory. Copy Button imports the cn() helper from @/lib/utils. In an initialized shadcn project, install the dependencies for the two examples:

npm install motion lucide-react
FileCustomization
components/blur-reveal.tsxAdjust blur radius, vertical offset, and animation timing in the Motion variants.
components/copy-button.tsxModify the size map, icon transitions, and feedback duration.
app/globals.cssEdit your shadcn theme colors for components that use semantic Tailwind classes.

Use Spell UI with AI Coding Agents

With the @spell registry configured in components.json, initialize the shadcn MCP server for Claude Code:

npx shadcn@latest mcp init --client claude

Restart Claude Code and try requests like these:

Add @spell/blur-reveal to the homepage headline.
Build a customer logo strip with @spell/marquee.
Add @spell/copy-button beside the installation command.

Alternatives and Related Resources

xxtomm

xxtomm

Leave a Reply

Your email address will not be published. Required fields are marked *