Sora UI

Text Flip

Per-character 3D vertical flip on hover with staggered timing and reduced-motion support, powered by Motion. React.

Loading...

Text link or label whose characters flip vertically in 3D when hovered.

Installation

npx shadcn@latest add @soralabs/text-flip

File Structure

text-flip.tsx

Usage

Render as an anchor link and reverse the flip direction:

Keep the flipped state on mouse leave instead of flipping back:

Props

PropTypeDefault
text
string
-
stagger?
number
0.03
duration?
number
0.5
depth?
number
800
zOffset?
number | string
"0.1em"
flipOut?
boolean
true
reverse?
boolean
false
transition?
Transition
-
as?
React.ElementType
"span"
href?
string
-
className?
string
-

When to Use

Use TextFlip for interactive links, nav items, and footer contacts where a tactile per-character 3D flip reinforces hover feedback without shifting layout. It differs from Rolling Text, which plays a one-time scroll-triggered slot reveal, and Text Roll, which transitions between changing string values.

Accessibility

The full string is exposed via aria-label on the root element while the per-character 3D glyph spans are marked aria-hidden, so screen readers announce the text cleanly once. When prefers-reduced-motion: reduce is enabled, TextFlip skips the 3D flip and renders static text.

Built by Axyl. A motion-first component registry for React.

Last updated: 11/27/2026

On this page

Help keep SoraLabs moving.

Every contribution helps us build and maintain open-source tools for the community.

Sponsor on GitHub