Cards JS behaviour

Cycle stack

A vertical deck: drag the top card down, click it or press the button and it tucks in behind the others — a notification centre in the footprint of one card.

Real scenarios

The component as it is used in a product — not a specimen grid.

The notification centre

Five events in the space of one: drag the top card down, click it or press the button and it tucks behind the deck. The front card’s index rides a Livewire property.

Deploy finished

v2.4 is live in all regions.

2 min ago
1 / 5

What the server knows

wire:model sends the front index with the next request: Deploy finished · index 0

Important props

Important props
Prop Type Default What it does
items array [] Keys: icon, title, description, meta, tone; a slot named after a key replaces the built-in face.
index / wire:model int 0 The front card’s index; wire:model keeps it on the server.
nextLabel string null The “next card” button label.

Snippet

<x-nx::cycle-stack next-label="بعدی" wire:model="state.card" :items="[
    'deploy' => ['icon' => 'zap', 'tone' => 'cyan', 'title' => 'استقرار تمام شد', 'description' => 'نسخهٔ ۲٫۴ در همهٔ منطقه‌ها زنده است.', 'meta' => '۲ دقیقه پیش'],
]" />