Rainbow Effect

PreviousNext

An animated rainbow-styled text component that applies colorful layered shadows on desktop and gradient text fill on mobile. Great for decorative headings and playful typography.

rainbow-effect-default

Installation

pnpm dlx shadcn@latest add https://ui.dalim.in/r/styles/default/rainbow-effect.json

Usage

import { RainbowEffect } from "@/components/ui/rainbow-effect"
<div className="relative flex h-screen w-full items-center justify-center">
  <RainbowEffect text="Design" fontSize={12} />
</div>

API Reference

RainbowEffect

Renders stylized rainbow text with different desktop and mobile behaviors.

PropTypeDefaultDescription
textstring"design"The text content to render with rainbow effect.
classNamestring""Additional Tailwind/CSS classes for styling.
fontSizenumber20Font size in viewport width (vw).