SwipeUI

Product spotlight card

A saturated product card with the name and price at the top and a large tilted cutout that crosses the card's edge or stays inside it.

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

When to use it

  • A featured product at the top of a shop or category screen, such as this week's shoe.
  • A hero tile in a horizontal carousel of products, with the cutout leaning into the gap.
  • A launch or drop announcement where the product photo should feel bigger than the card.
  • Brand-coloured promo tiles that pick their fill from the theme's primary, secondary or accent colour.

When not to use it

  • Product photos with a background. Cover card lets a full photo be the card.
  • Long lists or grids of many products. Listing card is lighter and easier to scan.
  • Products that need ratings, sizes and add to cart on the card; build a detail screen.
  • Tight layouts with no room at the end edge. Use imagePlacement="contained".

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/shop.tsx
import { router } from 'expo-router';
import { ProductSpotlightCard } from '@/components/swipeui/card/product-spotlight-card';

// A cutout with a clear background (PNG or WebP with alpha).
const shoe = require('./assets/shoe.webp');

<ProductSpotlightCard
  title="Lumen Stride"
  price="$149"
  image={shoe}
  onPress={() => router.push('/product/lumen-stride')}
  className="w-4/5"
/>;

Examples

app/drops.tsx
import { ScrollView } from 'react-native';
import { ProductSpotlightCard } from '@/components/swipeui/card/product-spotlight-card';

// A carousel: each cutout leans into the gap before the next card.
<ScrollView horizontal contentContainerClassName="gap-12 px-4">
  {drops.map((drop) => (
    <ProductSpotlightCard
      key={drop.id}
      title={drop.name}
      price={drop.price}
      image={{ uri: drop.cutoutUrl }}
      tone={drop.featured ? 'primary' : 'secondary'}
      onPress={() => openDrop(drop.id)}
      className="w-64"
    />
  ))}
</ScrollView>;
app/bottles.tsx
import { ProductSpotlightCard } from '@/components/swipeui/card/product-spotlight-card';

// A tall product, kept inside the card with a gentler tilt.
<ProductSpotlightCard
  title="Trail Bottle"
  price="$24"
  image={bottle}
  tone="accent"
  imagePlacement="contained"
  imageAspectRatio={0.8}
  imageRotation={-8}
/>;

Glass appearance

In the preview, choose Glass in the Preset picker. Pass the Pro Glass material into surfaceBackground to style the card fill.

API reference

ProductSpotlightCardProps

PropTypeDefaultDescription
titlestring—

The product's name, at the top start in bold.

price?string—

The price, exactly as it should read (you format the currency), under the title.

imageunion—

The product cutout: a bundled image, { uri }, or any node such as your own image or SVG. Use a cutout with a clear background so it sits on the card's colour.

imageAccessibilityLabel?string—

Describes the cutout for screen readers; it's added to the card's label. Leave it unset when the title already says what the photo shows.

tone?ProductSpotlightTone'primary'

The card's fill, from the theme. Text uses the tone's foreground colour.

surfaceBackground?objectundefined

Decorative fill. The title and price use neutral theme ink when set.

imagePlacement?ProductSpotlightPlacement'overflow'

overflow lets the cutout cross the card's end edge, so leave room there (about a fifth of the card's width). contained keeps it inside the card and clips anything that reaches the corners.

imageRotation?number-20

The cutout's tilt in degrees; negative lifts the end side. Mirrors in RTL.

imageScale?number1

The cutout's size, where 1 is the placement's default; it grows from its centre.

imageOffset?{ x: number; y: number; }{ x: 0, y: 0 }

Moves the cutout in points: x toward the end edge, y down.

imageAspectRatio?number2

The cutout box's width divided by its height; the cutout fits inside it.

aspectRatio?number5 / 6

The card's width divided by its height.

shadow?booleantrue

The soft elliptical ground shadow under the cutout.

palette?Partial<ProductSpotlightPalette>PRODUCT_SPOTLIGHT_PALETTE

The ground shadow's colour and depth.

onPress?((event: GestureResponderEvent) => void)—

Opens the product. Without it the card is a static surface.

disabled?booleanfalse

Prevents pressing and dims the card.

haptics?booleantrue

A light haptic tap when the card is pressed.

motion?MotionOverridethe app's feel (smooth without a provider)

Motion for the press (press role) and for the cutout moving between placements (layout role).

accessibilityLabel?stringthe title, price and image label, joined

What a screen reader announces.

accessibilityHint?string—

Says what pressing does, such as "Opens the product".

className?string—

Classes merged over the root, which holds the card and the cutout.

style?StyleProp<ViewStyle>—

Native style escape hatch for the root.

testID?string—

Root identifier; the cutout adds -image and the shadow -shadow.

Composition and behavior

  • The card is a tone-filled surface from the theme (primary by default) with the title and price at the top start, in the tone's foreground colour.
  • The image is a product cutout drawn above a soft elliptical ground shadow. It sits beside the surface rather than inside it, so with imagePlacement="overflow" it crosses the card's end edge on both platforms. Leave about a fifth of the card's width free at that edge.
  • imagePlacement="contained" keeps the cutout inside the card and clips anything that reaches the corners. Switching placement, scale or offset springs the cutout to its new spot on the layout role.
  • With onPress the whole card is one button and presses in with the cutout. Without it the card is a static surface read as one element.
  • In right-to-left layouts the cutout crosses the left (end) edge and its tilt mirrors. The photo itself isn't flipped, so product lettering stays readable.

Cutout settings

PropDoesDefault
imagePlacementoverflow crosses the end edge; contained stays inside the cardoverflow
imageRotationThe cutout's tilt in degrees; mirrors in RTL-20
imageScaleThe cutout's size, growing from its centre1
imageOffsetMoves the cutout in points (x toward the end, y down){ x: 0, y: 0 }
imageAspectRatioThe cutout box's shape; the cutout fits inside it2
shadowThe soft ground shadow under the cutouttrue
paletteThe shadow's colour and depthPRODUCT_SPOTLIGHT_PALETTE

Card settings

PropDoesDefault
toneThe fill from the theme: primary, secondary, accent or mutedprimary
aspectRatioThe card's width divided by its height5 / 6
onPressMakes the card one buttonnone (static)
disabledDims the card and ignores pressesfalse
hapticsA light tap when pressedtrue
motionThe press and placement feel; none jumpsthe app's feel

Behavior and gestures

  • Set surfaceBackground to replace the tone fill; the cutout still follows imagePlacement.
  • With onPress the whole card is one button: the card and the cutout press in together, with a light haptic.
  • imagePlacement="overflow" (the default) lets the cutout cross the card's end edge; "contained" keeps it inside and clips anything that reaches the corners.
  • Changing imagePlacement, imageScale or imageOffset springs the cutout to its new spot; the first layout lands at once.
  • imageRotation tilts the cutout (default -20 degrees), imageScale grows it from its centre and imageOffset nudges it in points.
  • tone picks the fill from the theme (primary, secondary, accent or muted) and the matching text colour. shadow={false} removes the ground shadow.
  • Without onPress it's a static surface. disabled dims the card and ignores presses; haptics={false} turns off the tap.

Accessibility

  • The card is read as one element: the title, the price and imageAccessibilityLabel if you set one, such as "Lumen Stride, $149".
  • With onPress it's a button with a target far larger than 44pt; add accessibilityHint to say where it goes.
  • The cutout and its shadow are decorative and hidden from screen readers.
  • Text follows Dynamic Type; the title wraps to two lines.
  • In right-to-left layouts the cutout crosses the left edge (the end) and its tilt mirrors. Under Reduce Motion placement changes land at once.

Motion

  • Uses the press and layout motion roles, so it follows your app's feel. Pass motion to tune this one instance.
  • Pressing scales the whole card, cutout included, on the press role.
  • The cutout's box springs between placements, sizes and offsets on the layout role, and its tilt springs with it.
  • Under Reduce Motion, or with the none feel, the cutout jumps to its new spot and the card doesn't scale.

Performance

  • One image and one small vector shadow. The cutout animates with transforms and size on the UI thread; React renders only when props change or the card is measured.

Notes for AI

  • Pass a cutout with a clear background (PNG or WebP with alpha) as image; a photo with a background belongs in CoverCard.
  • Leave room at the end edge for imagePlacement="overflow", for example give the card w-4/5 or a carousel gap; switch to "contained" when there is none.
  • Use imageAspectRatio for tall products such as bottles (for example 1 or 0.8) so the cutout isn't shrunk.
  • Pick tone from the theme instead of styling the fill; the text colour follows.

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