Lazy-ui
Lazy-ui
registry components
DocsComponentsBlocksChangelog
GitHub0Install
Navigation11 groups
Get StartedDocs
  • Introduction
  • Installation
  • Changelog
  • All Components
Background13 items
  • Wave CipherNew
  • Horizon CipherNew
  • Orbit CipherNew
  • Orbit BloomNew
  • Orbit MeshNew
  • Aurora MeshNew
  • Chroma FlowNew
  • Prism DriftNew
  • Shadow MeshNew
  • Slime BackgroundNew
  • NeumorphismNew
  • Ripple SurfaceNew
  • Liquid ChromeNew
Text Animate7 items
  • Shiny Text
  • Text WarpNew
  • Text RiseNew
  • Text SpinNew
  • Text ScrambleNew
  • Spinning TextNew
  • Text FlipNew
Animate6 items
  • Counter
  • Liquid RevealNew
  • Liquid TransitionNew
  • Matrix GridNew
  • Particle HaloNew
  • Bling TransitionNew
Effects2 items
  • Reveal Animate
  • Circle CipherNew
Forms2 items
  • Switch
  • Checkbox
Buttons3 items
  • Copy Button
  • GitHub Stars Button
  • Glass ButtonNew
Feedback1 item
  • Progress
Navigation1 item
  • Animated Tabs
Overlay1 item
  • Animate Tooltip
Device Mocks1 item
  • iPhoneNew

Text Flip

Per-character 3D flip — letters tumble around an axis on hover, mount, or first scroll into view.

text-flip

Hover to flip.HHoovveerrttoofflliipp..

0px

Customize

Edit props; preview updates instantly.

Customize
Trigger
Direction
Stagger from
Stagger (s)
0.04s
Duration (s)
0.55s
Perspective (px)
1000px

Props

Props accepted by TextFlip.

PropTypeDefaultDescription
textstring—Text to animate. Words split on spaces; each grapheme is its own motion span.
asElementType"p"Root element tag — swap to `h1`, `span`, `div`, etc.
direction"top" | "right" | "bottom" | "left""right"Axis and direction the flip pivots around. `left`/`right` rotate on Y, `top`/`bottom` rotate on X.
staggernumber0.04Seconds between character starts. Combined with `staggerFrom` to decide each char's delay.
staggerFrom"first" | "last" | "center" | number"first"Where the stagger originates. `first`/`last` walk one way, `center` ripples outward, a number anchors to a specific index.
durationnumber0.55Per-character flip duration in seconds.
trigger"hover" | "mount" | "view""hover"What kicks the animation off. `hover` plays on mouse-enter (re-trigger-safe), `mount` plays once on first render, `view` plays the first time the element scrolls into view.
transitionTransition—Custom Motion transition. When set, it overrides the per-char duration/delay/easing — apply your own if you need a spring or different curve.
perspectivenumber1000Perspective applied to the root in pixels. Lower values exaggerate the depth.
charClassNamestring—Class merged onto each character span — handy for per-letter color or shadow.
classNamestring—Extra class names merged onto the root element.

Installation

Choose CLI for the one-line shadcn install, or copy the file manually.

npx shadcn@latest add https://2lazyui.com/r/text-flip.json

Usage

Import the component and drop it into a render.

demo.tsx12 lines
import { TextFlip } from "@/components/lazy-ui/text-animate/text-flip";

export function Demo() {
  return (
    <TextFlip
      text="Hover to flip."
      direction="right"
      stagger={0.04}
      className="text-5xl font-light text-neutral-100"
    />
  );
}
Registryv0.1
Animated TabsNavigationCopy ButtonButtonsGitHub Stars ButtonButtonsReveal AnimateEffectsCounterAnimateShiny TextText AnimateText WarpText AnimateText RiseText AnimateText SpinText AnimateText ScrambleText AnimateSpinning TextText AnimateText FlipText AnimateProgressFeedbackSwitchFormsGlass ButtonButtonsCheckboxFormsiPhoneDevice MocksCircle CipherEffectsLiquid RevealAnimateLiquid TransitionAnimateWave CipherBackgroundHorizon CipherBackgroundOrbit CipherBackgroundOrbit BloomBackgroundOrbit MeshBackgroundMatrix GridAnimateParticle HaloAnimateAurora MeshBackgroundChroma FlowBackgroundPrism DriftBackgroundShadow MeshBackgroundSlime BackgroundBackgroundNeumorphismBackgroundRipple SurfaceBackgroundLiquid ChromeBackgroundBling TransitionAnimateAnimate TooltipOverlayPricing · ClassicBlocks · PricingPricing · BentoBlocks · PricingPricing · EditorialBlocks · PricingPricing · MatrixBlocks · PricingPricing · UsageBlocks · Pricing
Browse all 42 components
Up nextRoadmap
DialogPlanned
TabsPlanned
TooltipPlanned
CommandPlanned
Help the project
Star on GitHubSuggest a componentRead the DESIGN.md