BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/aceternity/colourful-text

colourful-text

aceternity/colourful-text
UnverifiedComponent

aceternity publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/rickhallett/becoming-diamond-nextjs/main/colourful-text.json

Source

ui/colourful-text.tsxraw.githubusercontent.com/rickhallett/becoming-diamond-nextjs/main/colourful-text.json
1"use client";
2import React from "react";
3import { motion } from "motion/react";
4
5export default function ColourfulText({ text }: { text: string }) {
6 const colors = [
7 "rgb(131, 179, 32)",
8 "rgb(47, 195, 106)",
9 "rgb(42, 169, 210)",
10 "rgb(4, 112, 202)",
11 "rgb(107, 10, 255)",
12 "rgb(183, 0, 218)",
13 "rgb(218, 0, 171)",
14 "rgb(230, 64, 92)",
15 "rgb(232, 98, 63)",
16 "rgb(249, 129, 47)",
17 ];
18
19 const [currentColors, setCurrentColors] = React.useState(colors);
20 const [count, setCount] = React.useState(0);
21
22 React.useEffect(() => {
23 const interval = setInterval(() => {
24 const shuffled = [...colors].sort(() => Math.random() - 0.5);
25 setCurrentColors(shuffled);
26 setCount((prev) => prev + 1);
27 }, 5000);
28
29 return () => clearInterval(interval);
30 }, []);
31
32 return text.split("").map((char, index) => (
33 <motion.span
34 key={`${char}-${count}-${index}`}
35 initial={{
36 y: 0,
37 }}
38 animate={{
39 color: currentColors[index % currentColors.length],
40 y: [0, -3, 0],
41 scale: [1, 1.01, 1],
42 filter: ["blur(0px)", `blur(5px)`, "blur(0px)"],
43 opacity: [1, 0.8, 1],
44 }}
45 transition={{
46 duration: 0.5,
47 delay: index * 0.05,
48 }}
49 className="inline-block whitespace-pre font-sans tracking-tight"
50 >
51 {char}
52 </motion.span>
53 ));
54}

Files it writes

  • ui/colourful-text.tsx

Facts

Registry
aceternity
Type
registry:ui
Access
Unverified
Files written
1
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
today

Go to the source

ui.aceternity.com rickhallett/becoming-diamond-nextjs on GitHub Raw registry item This item as JSON

More from aceternity

All 89 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
3d-card3d-cardaceternityComponentsUnverifiedno deps
3d Globe3d-globeaceternityComponentsFree3 deps
3d-marquee3d-marqueeaceternityComponentsUnverifiedno deps
3d-pin3d-pinaceternityComponentsUnverified1 dep
animated-modalanimated-modalaceternityComponentsUnverified1 dep
animated-testimonialsanimated-testimonialsaceternityComponentsUnverified2 deps
animated-tooltipanimated-tooltipaceternityComponentsUnverified1 dep
apple-cards-carouselapple-cards-carouselaceternityComponentsUnverified2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex