gradual-spacing-text
eldoraui/gradual-spacing-textFreeComponent
A gradual spacing text component.
Live preview
live · rendered by the registry
Rendered by eldoraui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://eldoraui.site/r/gradual-spacing-text.jsonSource
1"use client"23import clsx from "clsx"4import { AnimatePresence, motion } from "motion/react"56interface GradualSpacingTextProps {7 text?: string8 className?: string9}1011export const GradualSpacingText: React.FC<GradualSpacingTextProps> = ({12 text = "",13 className = "",14}) => {15 const gradual = {16 hidden: { opacity: 0, x: -20 },17 visible: { opacity: 1, x: 0 },18 }1920 return (21 <div className={clsx("flex justify-center space-x-1", className)}>22 <AnimatePresence>23 {text.split("").map((char, i) => (24 <motion.h125 key={i}26 initial="hidden"27 animate="visible"28 exit="hidden"29 variants={gradual}30 transition={{ duration: 0.5, delay: i * 0.1 }}31 className={clsx(32 "font-display text-center font-bold drop-shadow-sm",33 "text-4xl md:text-5xl lg:text-6xl xl:text-7xl",34 "tracking-[-0.02em]",35 "md:leading-[4rem] lg:leading-[4.5rem] xl:leading-[5rem]"36 )}37 >38 {char === " " ? <span> </span> : char}39 </motion.h1>40 ))}41 </AnimatePresence>42 </div>43 )44}
What it pulls in
npm packages
Files it writes
More from eldoraui
All 115 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| animated-badgeanimated-badge | eldoraui | Components | Free | 2 deps | |
| animated-frameworksanimated-frameworks | eldoraui | Components | Free | 2 deps | |
| animated-grid-patternanimated-grid-pattern | eldoraui | Components | Free | 3 deps | |
| animated-listanimated-list | eldoraui | Components | Free | 1 dep | |
| animated-shiny-buttonanimated-shiny-button | eldoraui | Components | Free | 1 dep | |
| blur-in-textblur-in-text | eldoraui | Components | Free | 3 deps | |
| browserbrowser | eldoraui | Components | Free | 2 deps | |
| card-flip-hovercard-flip-hover | eldoraui | Components | Free | 1 dep |
