AppSpotlight
A HomeBanner-like spotlight with caller-owned desktop/mobile artwork, Motion slide transitions, centered item lines within their 24px slots, and previous/next arrows at bottom right. The desktop title uses Funnel Display semibold at 48/52 with −2% tracking; mobile uses 24/30. The subtitle uses Funnel Sans regular 14/20 in foreground/subtle, with a 12px gap below the title. Items can be mapped from API records; action links and artwork URLs are configurable. Slides rotate every five seconds by default and stop after manual navigation.
Playground
Live preview
Item and artwork variants
Signed-out Home slide set
Three items with different artwork and actions
Single item without arrows
Two CTAs
Caller-supplied desktop and mobile art pair
One image URL and a custom CTA slot
Responsive width
Narrow container — fixed mobile slide height
Code
import { AppSpotlight, type AppSpotlightItem } from "@npolyhunter/ui";
// Map validated API records into the serializable item shape.
const slides: AppSpotlightItem[] = records.map((record) => ({
id: record.id,
pretitle: record.pretitle,
title: record.title,
subtitle: record.subtitle,
background: {
desktop: record.desktopImageUrl,
mobile: record.mobileImageUrl ?? undefined,
},
actions: record.actions.map((action) => ({
label: action.label,
href: action.href,
variant: action.variant,
})),
}));
// Use eager loading only when this is the visible page hero.
<AppSpotlight
items={slides}
defaultIndex={0}
autoPlay
autoPlayIntervalMs={5000}
imageLoading="eager"
aria-label="Featured opportunities"
previousLabel="Previous slide"
nextLabel="Next slide"
indicatorsLabel="Slides"
getItemLabel={(index) => "Show slide " + (index + 1)}
/>
// Controlled alternative:
<AppSpotlight
items={slides}
activeIndex={activeIndex}
onActiveIndexChange={setActiveIndex}
/>Used in
Includes use through shared UI components.
App



