Skip to content
GaudiGaudi Design System home

Search documentation

Search every page, heading and paragraph.

WarpText

Text gently undulates at rest and bends beneath a moving pointer lens.

AnimationsText@gaudi/design-system/animations/WarpTextView in StorybookSource

Hover magnifies a local area, adds a soft ripple and optional RGB refraction, then eases back on exit.

Installation

pnpm add github:ahmadassaf/design-system

Import from @gaudi/design-system. Load @gaudi/design-system/global.css once and add transpilePackages: ['@gaudi/design-system'] in Next.js.

import { WarpText } from '@gaudi/design-system/animations/WarpText';

Usage

import { WarpText } from '@gaudi/design-system/animations/WarpText';
<div style={{ fontSize: 96, fontWeight: 700 }}> <WarpText text="Bend the moment" /></div>

Examples

Playground

Storybook

Hover lens

Storybook

Multiline refraction

Storybook

API

10 props

Accessibility

The full text is exposed once. The canvas is decorative and does not change the accessible text. Paused and reduced-motion states are undistorted. Touch does not latch hover, and no extra keyboard stop is added for a decorative effect. Provide a pause control for continuous motion.

Notes

  • Typography and color come from the host. The text texture fits its container and refreshes when fonts or themes change.
  • WebGL unavailable or lost: the readable HTML text remains visible. Forced colors uses the HTML fallback.
  • Visual behavior inspired by Warp Text from React Bits. Independently implemented for Gaudi; no upstream source or assets are included.