UIPin
ComponentsIconsIllustrationsMotionTemplatesApps
Boards
UIPin

Free, open-source UI components, icons, illustrations, motion, templates and apps, in one search. Every item links to its source and licence.

UIPin is free. If it saved you time, you can keep it running:

Buy me a coffee
ComponentsIconsIllustrationsMotionTemplatesAppsLibrariesCompareNew this weekMCP for agentsBoardsPrivacy

Components, icons and artwork belong to their authors and are shown under their open-source licences.

Eldora UI/Multi Direction Slide Text

Text effects
Compiling

Theme it

Every preview, live

Brand colour

Corner radius

Font

Recolours shadcn’s tokens, Tailwind’s accent colours and colours set in the code. Red, amber and green classes stay, since they usually mean error, warning or success.

Multi Direction Slide Text

A multi direction slide text component.

npx shadcn@latest add https://eldoraui.site/r/multi-direction-slide-text.json
Open in v0 Docs Repo
Library
Eldora UI
License
MIT
Stack
React · Tailwind CSS · animated
Packages
clsxmotion
Size
55 lines
Demo
From Eldora UI

Code

registry/eldoraui/multi-direction-slide-text.tsx

"use client"

import clsx from "clsx"
import { motion } from "motion/react"

interface MultiDirectionSlideTextProps {
  textLeft?: string
  textRight?: string
  className?: string
}

export const MultiDirectionSlideText: React.FC<
  MultiDirectionSlideTextProps
> = ({ textLeft = "", textRight = "", className = "" }) => {
  const MULTIDIRECTION_SLIDE_VARIANTS = {
    hidden: { opacity: 0, x: "-25vw" },
    visible: { opacity: 1, x: 0 },
    right: { opacity: 0, x: "25vw" },
  }

  return (
    <div className={clsx("overflow-hidden", className)}>
      <motion.h1
        initial="hidden"
        animate="visible"
        variants={MULTIDIRECTION_SLIDE_VARIANTS}
        transition={{ duration: 1 }}
        className={clsx(
          "font-display text-center font-bold drop-shadow-sm",
          "text-4xl md:text-5xl lg:text-6xl xl:text-7xl",
          "tracking-[-0.02em]",
          "md:leading-[4rem] lg:leading-[4.5rem] xl:leading-[5rem]"
        )}
      >
        {textLeft}
      </motion.h1>

      <motion.h1
        initial="right"
        animate="visible"
        variants={MULTIDIRECTION_SLIDE_VARIANTS}
        transition={{ duration: 1 }}
        className={clsx(
          "font-display text-center font-bold drop-shadow-sm",
          "text-4xl md:text-5xl lg:text-6xl xl:text-7xl",
          "tracking-[-0.02em]",
          "md:leading-[4rem] lg:leading-[4.5rem] xl:leading-[5rem]"
        )}
      >
        {textRight}
      </motion.h1>
    </div>
  )
}

More like this

Logo Loop

React Bits·Media & 3DMIT+

8-bit Resizable Panel

8bitcn·Data display

Resizable

shadcn/ui·Data display

True Focus

React Bits·Text effectsMIT+

Border Trail

Motion Primitives·Cursor & effects

Gradient Heading

Cult UI·Text effects

8-bit Textarea

8bitcn·Text effects

8-bit Health Bar

8bitcn·Feedback & loaders

8-bit Mana Bar

8bitcn·Feedback & loaders

8-bit Progress

8bitcn·Feedback & loaders

Carousel

HextaUI·Media & 3D

8-bit XP Bar

8bitcn·Feedback & loaders

8-bit Slider

8bitcn·Inputs & forms

Card Nav

React Bits·NavigationMIT+

Side Panel

Cult UI·Other