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-cardWhen 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
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
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>;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
| Prop | Type | Default | Description |
|---|---|---|---|
title | | — | The product's name, at the top start in bold. |
price? | | — | The price, exactly as it should read (you format the currency), under the title. |
image | | — | The product cutout: a bundled image, |
imageAccessibilityLabel? | | — | 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? | | | The card's fill, from the theme. Text uses the tone's foreground colour. |
surfaceBackground? | | | Decorative fill. The title and price use neutral theme ink when set. |
imagePlacement? | | |
|
imageRotation? | | | The cutout's tilt in degrees; negative lifts the end side. Mirrors in RTL. |
imageScale? | | | The cutout's size, where 1 is the placement's default; it grows from its centre. |
imageOffset? | | | Moves the cutout in points: x toward the end edge, y down. |
imageAspectRatio? | | | The cutout box's width divided by its height; the cutout fits inside it. |
aspectRatio? | | | The card's width divided by its height. |
shadow? | | | The soft elliptical ground shadow under the cutout. |
palette? | | | The ground shadow's colour and depth. |
onPress? | | — | Opens the product. Without it the card is a static surface. |
disabled? | | | Prevents pressing and dims the card. |
haptics? | | | A light haptic tap when the card is pressed. |
motion? | | | Motion for the press (press role) and for the cutout moving between placements (layout role). |
accessibilityLabel? | | | What a screen reader announces. |
accessibilityHint? | | — | Says what pressing does, such as "Opens the product". |
className? | | — | Classes merged over the root, which holds the card and the cutout. |
style? | | — | Native style escape hatch for the root. |
testID? | | — | Root identifier; the cutout adds |
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
| Prop | Does | Default |
|---|---|---|
| imagePlacement | overflow crosses the end edge; contained stays inside the card | overflow |
| imageRotation | The cutout's tilt in degrees; mirrors in RTL | -20 |
| imageScale | The cutout's size, growing from its centre | 1 |
| imageOffset | Moves the cutout in points (x toward the end, y down) | { x: 0, y: 0 } |
| imageAspectRatio | The cutout box's shape; the cutout fits inside it | 2 |
| shadow | The soft ground shadow under the cutout | true |
| palette | The shadow's colour and depth | PRODUCT_SPOTLIGHT_PALETTE |
Card settings
| Prop | Does | Default |
|---|---|---|
| tone | The fill from the theme: primary, secondary, accent or muted | primary |
| aspectRatio | The card's width divided by its height | 5 / 6 |
| onPress | Makes the card one button | none (static) |
| disabled | Dims the card and ignores presses | false |
| haptics | A light tap when pressed | true |
| motion | The press and placement feel; none jumps | the 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
pressandlayoutmotion roles, so it follows your app's feel. Passmotionto 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 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.