Gradient text
A word or headline whose letters are filled by slowly moving colour washes.
npx @swipeui/cli add gradient-textVariant
Preset
Material
Scheme
Feel
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
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
| Setting | Default | Behavior |
|---|---|---|
text | required | The 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. |
baseColor | muted and foreground tokens | Fill under the washes: one colour, or a top and bottom pair. |
orbit | true | Washes travel around the text box. Off holds them in place. |
drift | true | The colours slowly cross-fade into a shifted set, so a lap never looks the same. |
speed | 1 | Playback rate; must be positive and finite. |
washes | palette length | How many washes are drawn, from 1 to 12. |
active | true | Explicit pause for hidden or occluded routes. Offscreen and background pauses are automatic. |
motion | app feel | Shared ambient feel; Reduce Motion holds a still frame. |
className | absent | Root classes. |
style | absent | Native layout escape hatch. |
testID | absent | Root 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
ambientmotion role, so it follows your app's feel. Passmotionto 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 on | Supported |
|---|---|
| Expo SDK 57 | Yes |
| Expo SDK 58 | Yes |
| React Native CLI (with Expo modules) | Yes |
| Expo Go | Yes |
| iOS | Yes |
| Android | Yes |
This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.