SwipeUI

Gradient card

A card whose background is a soft field of colour glows that slowly travel and cross-fade, with a title, description, count chip and arrow, and a switch for every animation.

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

When to use it

  • A home screen with a few big destinations, such as Components, Themes and Motion, each with a count.
  • One hero message with its own button, such as a plan upgrade or a new feature.
  • A section header card that should feel alive without a photo or an illustration.
  • Onboarding or empty states where a calm moving colour field sets the mood.

When not to use it

  • Long lists of cards; the glows are for a handful of moments, not every row.
  • Content led by a photo. Cover card makes the photo the whole card.
  • Dense data such as a balance or a metric trend. Metric card shows the number and its history.
  • Screens that already move a lot; one expressive background per view is enough.

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/index.tsx
import { GradientCard } from '@/components/swipeui/card/gradient-card';

<GradientCard
  eyebrow="145 total"
  title="Components"
  description="Explore every component"
  palette={['--color-chart-1', '--color-chart-2']}
  onPress={() => router.push('/components')}
/>;

Examples

destinations and hero. The app and public preview use the same content and variant names. The Animation and Palette settings sit outside the card.

Use it for a handful of destinations on a home screen, or one hero message with its own button. Give each card on a screen a different palette or token pair so they read as distinct places.

Settings

SettingDefaultBehavior
titlerequiredThe card's name, read first.
descriptionabsentOne or two short lines under the title.
eyebrowabsentA small chip above the title, such as "145 total"; a string or your own node.
actionarrow when pressableTrailing action beside the title; false hides it.
onPressabsentOpens whatever the card stands for; the whole card presses in with a light haptic. Ignored when children add their own actions.
childrenabsentExtra content under the details, such as the card's own button. The card itself is then not pressable.
disabledfalseStops pressing and dims the card.
hapticstrueA light haptic tap on press.
size'lg'lg (232pt minimum) for a destination or hero, md (168pt) for a denser stack.
palette'theme'theme (the preset's chart colours), aurora, sunset, ocean, candy, or at least two colours and --color-* tokens.
animatedtrueMaster switch for every animation; off draws a still glow.
orbittrueThe glows travel slowly around their corner.
drifttrueThe colours cross-fade into a shifted set, so a lap never looks the same.
speed1Playback rate; must be positive and finite.
intensity0.8Glow strength from 0 to 1. Light schemes are softer automatically.
origin'bottom-end'Where the light gathers: top-start, top-end, bottom-start, bottom-end or center. Start and end follow the reading direction.
washespalette lengthHow many glows are drawn, from 1 to 8.
activetrueExplicit pause for hidden routes. Offscreen and background pauses are automatic.
motionapp feelShared ambient feel; Reduce Motion holds a still glow.
accessibilityLabelchip, title and descriptionSpoken name.
accessibilityHintabsentWhat pressing the card does.
classNameabsentRoot classes.
styleabsentNative layout escape hatch.
testIDabsentRoot ID.

Accessibility

A pressable card is one button read as its chip, title and description. With children, the details are one focus stop and the children keep their own controls. The glows and the arrow are decorative. Under Reduce Motion the glow holds still, and glows are softer in light schemes so text over them keeps its contrast.

Behavior and gestures

  • With onPress the whole card presses in with a light haptic and shows an arrow; action replaces the arrow and action={false} hides it.
  • children add content under the details, such as the card's own button; the card itself is then not pressable.
  • animated switches every animation off at once; orbit (glows travel) and drift (colours cross-fade) switch each part on its own.
  • palette takes a named palette or your own colours and --color-* tokens; the default theme palette follows the preset's chart colours.
  • origin chooses the corner where the light gathers (start and end follow the reading direction); intensity sets how strong the glow is.
  • speed changes the pace, washes the number of glows, and active pauses a card on a hidden route.

Accessibility

  • A pressable card is one button read as the chip, title and description, such as "145 total, Components, Explore every component".
  • With children the details are one focus stop and the children keep their own controls.
  • The glow and the arrow are decorative and hidden from assistive technology.
  • Glows are softer in light schemes so text over them keeps its contrast; check custom palettes in both schemes.

Motion

  • Uses the ambient and press motion roles, so it follows your app's feel. Pass motion to tune this one instance.
  • The glows move on the ambient role at a slow linear pace and pause offscreen, in the background and when active is false.
  • Under Reduce Motion the card holds a still glow; the press keeps only its haptic.

Performance

  • Each glow is drawn once into its own rasterized layer and then only moved by transform and faded by opacity on the UI thread, so scrolling stays smooth with several animated cards on screen; nothing re-renders or redraws while they move.

Notes for AI

  • Give each card on one screen a different palette or token pair so they read as distinct destinations.
  • Keep the title short and the description to one line; the eyebrow suits a count such as "6 total".
  • Pass animated={false} where motion would distract, such as behind a form.

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