Cards JS behaviour

Expandable stack

A fanned pile of cards that flies out into a grid (FLIP on the gentle spring) and back — for compact galleries.

Real scenarios

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

The brand library, in one row

Five assets live in the footprint of one card; “Show all” flies them out into a grid on the gentle spring and back again. The open/closed state rides a Livewire property.

  • Logotype

    The wordmark, the monogram and the clear-space rules.

The campaign archive

expanded opens it on arrival — the three seasonal campaigns of last year, already spread out.

  • Spring · «نوروز»

    Tea, mirrors and seven days of stories.

  • Summer · «کنار دریا»

    The Caspian coast, shot in one week.

  • Fall · «بازار»

    Grand Bazaar at 5 a.m., before the crowd.

Important props

Important props
Prop Type Default What it does
items array [] Keys: title, description, cover, image, alt, tone; a slot named after an item key fills its artwork.
expanded bool false Opens the stack on arrival.
wire:model — null Keeps the open/closed state in step with a Livewire property.
expandLabel / collapseLabel string Show all / Stack them The expand and collapse button labels.

Snippet

<x-nx::expandable-stack wire:model="state.open" expand-label="نمایش همه" collapse-label="بستن" :items="[
    'logo' => ['title' => 'لوگو', 'description' => '…', 'cover' => $art['lapis']],
    'type' => ['title' => 'تایپ', 'description' => '…', 'cover' => $art['gold']],
]" />