SwipeUI

Gradient text

A word or headline whose letters are filled by slowly moving colour washes.

npx @swipeui/cli add gradient-text
Variant
Preset
Material
Scheme
Feel
Interactive web demo. Native materials, gestures and system presentation differ on device.

When to use it

  • Give one word weight: a plan name, a hero word or an upgrade prompt.
  • Mark something premium or new without adding a badge.

When not to use it

  • Body text or anything longer than a short line; it never wraps.
  • Several moving words in one view. Use it once per screen.
  • Loading states. Use Text shimmer.

Installation

Installs with a Pro licence

Everything on this page is public except the source. Founder pre-sale opens around 5 January 2027.

Usage

app/plan.tsx
import { GradientText } from '@/components/swipeui/ui/gradient-text';

<GradientText text="Pro" palette="aurora" />;

Examples

plan, headline, palettes. The app and public preview use the same content and variant names. Demo settings sit outside the component.

Use it for one short word per screen. The text stays on one line and scales down inside a narrower parent instead of wrapping.

Settings

SettingDefaultBehavior
textrequiredThe visible and spoken text. One line; it scales down instead of wrapping.
variant'large-title'Text style from the type scale.
weight'700'Font weight of the letters.
palette'aurora'A preset name (aurora, sunset, ocean, candy), or your own list of at least two colours.
baseColormuted and foreground tokensFill under the washes: one colour, or a top and bottom pair.
orbittrueWashes travel around the text box. Off holds them in place.
drifttrueThe colours slowly cross-fade into a shifted set, so a lap never looks the same.
speed1Playback rate; must be positive and finite.
washespalette lengthHow many washes are drawn, from 1 to 12.
activetrueExplicit pause for hidden or occluded routes. Offscreen and background pauses are automatic.
motionapp feelShared ambient feel; Reduce Motion holds a still frame.
classNameabsentRoot classes.
styleabsentNative layout escape hatch.
testIDabsentRoot ID.

Accessibility

Screen readers get one text element with the plain string. Under Reduce Motion the colours hold still, and the base fill keeps the word readable.

Behavior and gestures

  • Colour washes travel behind the letters; orbit and drift are independent switches.
  • palette takes a preset name or your own colours; washes sets how many are drawn and speed how fast they move.
  • The shared ambient helper pauses it off screen, in the background and under Reduce Motion; active pauses an occluded route.

Accessibility

  • One text element with the plain string as its label. The drawing is hidden from assistive technology.
  • Reduce Motion holds a still, readable gradient. The base fill uses the foreground tokens, so the word stays legible if the washes are faint.
  • Native VoiceOver/TalkBack, Dynamic Type and RTL evidence remain pending for 7.9.

Motion

  • Uses the ambient motion role, so it follows your app's feel. Pass motion to tune this one instance.
  • The wash field takes its clock from the shared ambient role; every position is periodic, so the loop has no seam.
  • Reduce Motion stops the clock and keeps the first frame.

Performance

  • No new package. Wash positions are animated props on the UI thread; nothing re-renders per frame.
  • The clock stops when the text is hidden, off screen or in the background.

Notes for AI

  • Keep text short and on one line. Use active={false} for routes that are mounted but covered.
  • Colours live in gradient-text-palette.ts; pass palette to use your own. Source checks do not establish native glyph alignment or frame rate.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items