Xzero UI
Pro library

Cover flowPro

A depth rail of images you can throw, with soft grounded shadows and a quiet reflection.

$ pnpm dlx shadcn@4.23.0 add @xzero-ui-pro/cover-flow
Live · keyboard ready

When to use

When not to use

Installation

Register both Xzero UI namespaces in your project's components.json:

{
  "registries": {
    "@xzero-ui": "https://mcp.xzero.co.uk/r/{name}.json",
    "@xzero-ui-pro": "https://mcp.xzero.co.uk/r/pro/{name}.json"
  }
}
npx shadcn@4.23.0 add @xzero-ui-pro/cover-flow

Install xzero-foundation once, and import @/components/xzero/foundation.css in your app root. No Xzero token is used by this snapshot. For sample portraits, photos, fonts, or logos, download https://mcp.xzero.co.uk/install-assets.mjs and run node xzero-install-assets.mjs <receiving-project>.

Usage

import { CoverFlow } from "@/components/xzero/cover-flow/cover-flow";

export function Hikes() {
  return (
    <CoverFlow
      label="Hikes for this fall"
      items={[
        { id: "ridge", title: "Ridge Loop", subtitle: "Mount Tam", meta: "8 km", image: "/hikes/ridge.jpg" },
        { id: "falls", title: "Cataract Falls", subtitle: "Marin", meta: "5 km", image: "/hikes/falls.jpg" },
      ]}
      onIndexChange={setIndex}
    />
  );
}

API reference

CoverFlow

A depth rail for browsing a short collection of images one at a time. The front card stands forward while the rest recede to either side, and each image drifts inside its frame as the rail moves.

PropTypeDefaultDescription
items (required){ id: string; title: string; subtitle?: string; meta?: string; image: string; imagePosition?: string; alt?: string }[]–Cards in order. alt defaults to the title. Generic: extra fields on your items are passed back to renderCaption.
label (required)string–Accessible name of the carousel, such as "Hikes for this fall".
indexnumber–Controlled front card. Pair with onIndexChange.
defaultIndexnumber0Initial front card when uncontrolled.
onIndexChange(index: number) => void–Called when a different card settles in front, and while a drag passes over one.
renderCaption(item: T, index: number) => ReactNode–Replaces the caption under the rail. It changes with the front card.
classNamestring–Extra class on the root.

Keyboard interactions

KeysAction
ArrowLeft / ArrowRightSteps one card while the rail has focus.
Home / EndJumps to the first or last card.

Accessibility

Motion

Responsive behavior

Performance

Notes for AI

Also in galleries

Guidance for AI tools

Cover flow: A depth rail of images you can throw, with soft grounded shadows and a quiet reflection. Follow the declared prop types and do not invent props. Keep keyboard access, reduced motion support, and both light and dark themes intact when adapting it.

Full library index: https://ui.xzero.co.uk/llms.txt

Browse all components