Installation
Usage
Components
The Apple Carousel suite is composed of four inter-related components:| Component | Purpose |
|---|---|
AppleCardCarousel | The horizontal scroll container with left / right controls. |
AppleCarouselItem | A wrapper that adds enter-animation and spacing to each card. |
AppleCard | A richly styled, clickable card that can expand into a fullscreen modal. |
AppleBlurImage | An <img> replacement that starts blurred until the image loads. |
AppleCardCarousel
Props
| Prop | Type | Default | Description |
|---|---|---|---|
initialScroll | number | 0 | Horizontal scroll offset applied on mount (in px). |
Slots
The default slot should contain one or moreAppleCarouselItem components.
AppleCarouselItem
Props
| Prop | Type | Required | Description |
|---|---|---|---|
index | number | ✓ | Zero-based index; used to stagger the appear animation. |
Slots
Default slot — place anAppleCard here.
AppleCard
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
card | { src: string; title: string; category: string } | ✓ | — | Data object for the card. |
index | number | ✓ | — | Position within the carousel. |
layout | boolean | ✕ | false | Enables shared-layout FLIP animation. |
Slots
When the card is expanded (modal open) the default slot renders inside the modal body; you can inject extended content such as text, images, or videos.AppleBlurImage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | — | Image source URL. Required. |
alt | string | ”Background of a beautiful view” | Alt text. |
width | number | string | img natural | Width attribute; omitted when using fill. |
height | number | string | img natural | Height attribute; omitted when using fill. |
fill | boolean | false | If true, sets width:100%; height:100% via utility classes. |
class | string | "" | Additional classes merged via cn(). |
load event it gracefully transitions from blur-sm to no-blur.