Shimmer Text
Shimmer Text é um componente de efeito para React e Tailwind CSS, da biblioteca Kokonut UI, com licença MIT. Copia e cola no teu projeto.
Kokonut UI
MIT
effects
O que é
Shimmer Text é um componente de efeito para React e Tailwind CSS, da biblioteca Kokonut UI, com licença MIT. Copia e cola no teu projeto.
Como usar
Abre o componente no catálogo, carrega em copiar, e cola no teu projeto. O prompt copiado leva o código e as regras para o teu agente o reproduzir sem alterar nada.
Cinco cópias grátis por mês. Sem cartão.
Precisa de
npm i motion
Licença
Este componente vem de Kokonut UI e é redistribuído sob a licença MIT, que permite uso comercial. O aviso de copyright viaja com o código.
Shimmer Text
"use client";
/**
* @author: @dorianbaffier
* @description: Shimmer Text
* @version: 1.0.0
* @date: 2025-06-26
* @license: MIT
* @website: https://kokonutui.com
* @github: https://github.com/kokonut-labs/kokonutui
*/
import { motion } from "motion/react";
import { cn } from "@/lib/utils";
interface Text_01Props {
text: string;
className?: string;
}
export default function ShimmerText({
text = "Text Shimmer",
className,
}: Text_01Props) {
return (
<div className="flex items-center justify-center p-8">
<motion.div
animate={{ opacity: 1, y: 0 }}
className="relative overflow-hidden px-4 py-2"
initial={{ opacity: 0, y: 20 }}
transition={{ duration: 0.5 }}
>
<motion.h1
animate={{
backgroundPosition: ["200% center", "-200% center"],
}}
className={cn(
"bg-[length:200%_100%] bg-gradient-to-r from-neutral-950 via-neutral-400 to-neutral-950 bg-clip-text font-bold text-3xl text-transparent dark:from-white dark:via-neutral-600 dark:to-white",
className
)}
transition={{
duration: 2.5,
ease: "linear",
repeat: Number.POSITIVE_INFINITY,
}}
>
{text}
</motion.h1>
</motion.div>
</div>
);
}