PixelDosa UI

Product Spotlight

Let visitors select a capability and see its explanation beside it.

One connected workflow

From first thought to finished work.

Make the next step clear.

Collect priorities and turn them into a plan everyone can follow.

Installation

bash
npx shadcn@latest add @pixeldosa/product-spotlight

Requires `cn` at `@/lib/utils`. Each feature item needs a stable unique id; provide a useful visual node when the selected feature benefits from a product preview.

Usage

<ProductSpotlight
  title="From first thought to finished work."
  items={[
    { id: "plan", label: "Plan", title: "Make the next step clear.", description: "Turn priorities into a plan." },
    { id: "build", label: "Build", title: "Keep work moving.", description: "Track owners and decisions." },
  ]}
/>

Props

PropTypeDefaultDescription
titlestring—Section heading.
eyebrowstring—Optional context above the heading.
itemsProductSpotlightItem[]—Selectable features with id, label, title, description, and optional visual.
density"comfortable" | "compact""comfortable"Vertical spacing preset.
classNamestring—Extra section classes.

why it's built this way

Engineering Notes

Uses a data-driven list and caller-supplied visual slot rather than hardcoding product screenshots or feature copy, so the same interaction can explain different products without forking layout code. Native buttons with aria-pressed provide predictable keyboard operation without a custom tab widget or an extra runtime dependency. The selected content is derived from the item id, and an empty collection renders an explicit empty message.

how it moves, and when it doesn't

Motion Notes

Selection changes content directly without an entrance animation; the visitor needs the new explanation immediately, not a decorative transition. Focus and selected-state styling provide the interaction feedback. No content is hidden behind motion, so reduced-motion preferences require no special behavior.