multi-direction-slide-text
eldoraui/multi-direction-slide-textFreeComponent
A multi direction slide 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/multi-direction-slide-text.jsonSource
1"use client"23import clsx from "clsx"4import { motion } from "motion/react"56interface MultiDirectionSlideTextProps {7 textLeft?: string8 textRight?: string9 className?: string10}1112export const MultiDirectionSlideText: React.FC<13 MultiDirectionSlideTextProps14> = ({ textLeft = "", textRight = "", className = "" }) => {15 const MULTIDIRECTION_SLIDE_VARIANTS = {16 hidden: { opacity: 0, x: "-25vw" },17 visible: { opacity: 1, x: 0 },18 right: { opacity: 0, x: "25vw" },19 }2021 return (22 <div className={clsx("overflow-hidden", className)}>23 <motion.h124 initial="hidden"25 animate="visible"26 variants={MULTIDIRECTION_SLIDE_VARIANTS}27 transition={{ duration: 1 }}28 className={clsx(29 "font-display text-center font-bold drop-shadow-sm",30 "text-4xl md:text-5xl lg:text-6xl xl:text-7xl",31 "tracking-[-0.02em]",32 "md:leading-[4rem] lg:leading-[4.5rem] xl:leading-[5rem]"33 )}34 >35 {textLeft}36 </motion.h1>3738 <motion.h139 initial="right"40 animate="visible"41 variants={MULTIDIRECTION_SLIDE_VARIANTS}42 transition={{ duration: 1 }}43 className={clsx(44 "font-display text-center font-bold drop-shadow-sm",45 "text-4xl md:text-5xl lg:text-6xl xl:text-7xl",46 "tracking-[-0.02em]",47 "md:leading-[4rem] lg:leading-[4.5rem] xl:leading-[5rem]"48 )}49 >50 {textRight}51 </motion.h1>52 </div>53 )54}
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 |
