Cards
JS behaviour
Depth carousel
The active card centred and full size, its neighbours smaller, pushed back and softened. Drag, buttons, dots, arrow keys — “next” sits toward the inline end (left in RTL).
Real scenarios
The component as it is used in a product — not a specimen grid.
Customer stories
Drag the front card sideways, use the dots, the buttons or the arrow keys — neighbours fall back and soften. The current slide rides a live Livewire property.
1 / 4
Slide on the server (wire:model.live):
The bakery that never misses an order
A product tour with a custom slide
loop wraps past the last card, and the slide keyed “demo” is a slot — any content you like, not just a cover.
1 / 3
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| items | array | [] | Keys: title, description, cover, image, alt, href, tone; a slot named after an item key replaces the built-in slide. |
| index / wire:model | int | 0 | The current slide; wire:model.live updates the index on the server. |
| loop | bool | true | Wraps around past the last slide. |
| dots / label | bool / string | true / null | The navigation dots and the accessible label. |
Snippet
<x-nx::depth-carousel label="قصههای مشتریان" :items="$stories" wire:model.live="state.slide" />