Auto height
A frame that springs to its new height whenever its content changes — a Livewire re-render, a tab switch, a card opening. ResizeObserver and a spring, plus interpolate-size where available.
Real scenarios
The component as it is used in a product — not a specimen grid.
Delivery options card
Each tab has a different amount of content. The card follows on a spring — the same happens when Livewire re-renders what is inside.
3–5 working days · free over $50
Today, within 3 hours
Available inside the city. The courier calls 15 minutes before arriving; you can track them live from your order page.
Fee: $4.90, refunded if late.
Ready tomorrow from 10:00
Valiasr St, No. 12 — bring your order code.
Expanding order summary
The toggle changes its label and icon too, so the motion is never the only cue.
- Leather sneakers ×1$64.00
- Wool socks ×2$17.50
- Courier$4.90
Important props
| Prop | Type | Default | What it does |
|---|---|---|---|
| spring | string | 'gentle' | snappy · gentle · bouncy · soft. |
| collapsed | bool | false | Folds to zero height and turns inert. |
Snippet
<x-nx::card>
<x-nx::segmented wire:model.live="plan" :options="['month' => 'ماهانه', 'year' => 'سالانه']" />
<x-nx::auto-height>
@if ($plan === 'year')
…جزئیات بلندتر پلن سالانه…
@else
…پلن ماهانه…
@endif
</x-nx::auto-height>
</x-nx::card>