Menus & navigation
JS behaviour
Registration card
A three-step event form: details, tickets with steppers and a rolling total, then confirm — it ends with a self-drawing check and confetti.
Real scenarios
The component as it is used in a product — not a specimen grid.
Registering for the design-systems workshop
Steps before the last never submit; the ticket steps recompute the total live and the figures roll in Persian digits. Fill the name, walk to the end, register.
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| event | array | [] | The card header’s title, date, location and badge. |
| tickets | array | [] | Each ticket: id, label, price, description and max; prices format through the page-locale NumberFormatter. |
| currency | string | USD | The currency code for price formatting (e.g. IRR). |
| model / wire:submit | string | null | With model the fields bind to model.name/email/tickets.{id}; wire:submit only submits on the last step. |
| success | bool | false | Set true once the server succeeded to play the finish animation. |
Snippet
<x-nx::registration-card model="state.reg" wire:submit="$set('state.done', true)"
:success="! empty($state['done'])" currency="IRR"
:event="['title' => 'کارگاه سیستم طراحی', 'date' => '۲۴ آبان', 'location' => 'برخط', 'badge' => 'ظرفیت محدود']"
:tickets="[
['id' => 'online', 'label' => 'حضوری', 'price' => 2800000, 'description' => 'با ناهار و کارگاه عملی', 'max' => 3],
['id' => 'student', 'label' => 'دانشجویی', 'price' => 0, 'max' => 1],
]" />