rainbow-effect-default
Cool
Designs
import { RainbowEffect } from "@/components/ui/texts/rainbow-effect"
export function Component() {
return (
<div className="flex h-full w-full items-center justify-center">
<div className="-mt-16 -ml-8 md:-space-y-3 xl:-space-y-8">
<RainbowEffect
className="font-bold tracking-tighter"
fontSize={6}
text="Cool"
/>
<RainbowEffect
className="-pl-6 font-bold tracking-tighter"
fontSize={7}
text="Designs"
/>
</div>
</div>
)
}
pnpm dlx shadcn@latest add "https://ui.dalim.in/r/rainbow-effect-default.json"
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.
Prop | Type | Default | Description |
---|---|---|---|
text | string | "design" | The text content to render with rainbow effect. |
className | string | "" | Additional Tailwind/CSS classes for styling. |
fontSize | number | 20 | Font size in viewport width (vw ). |