Base JS behaviour

Accordion

Over native <details>; animated open/close height with a grouped single-open mode.

Real scenarios

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

The shop’s support FAQ

The default list: single-open and joined, so opening a question folds the previous one. Every item is a native details element, so the answers sit in the page from the first paint — find-in-page and Tab navigation work before any JavaScript does, and the single-open rule itself is just a shared name on those details.

When will my order arrive?
Orders are processed within 24 business hours; delivery takes 2–4 business days by post and is same-day by courier in Istanbul. The tracking code arrives by SMS as soon as the parcel is handed over.
Can I return an item?
Up to 7 days after delivery, as long as the seal and the packaging are intact. Opened hygiene and food items cannot be returned.
Do you offer cash on delivery?
Yes, for orders under two million tomans in courier-covered cities. Larger orders are paid online or by card at the door.
How do I get an official invoice?
Tick “official invoice” at checkout and enter the company’s national ID; the invoice reaches your finance email together with the shipment.

The chevron turning over is only the extra cue — the row’s background and text weight change with it too.

The payment settings, section by section

With variant="separated" and :single="false" every section becomes its own card and stays open on its own — while you edit the payout account the gateway form you filled does not fold away. The slot holds real controls: the switch posts live (wire:model.live) and the fields ride along with the save button.

Payment gateway

From your bank’s payment panel.

Official invoice

16 digits, without spaces.

Payout account
IR

Payouts land on this account every Thursday; a new number applies after two cycles.

Only cash on delivery, for now

Flip the gateway switch above and the online checkout opens on the spot.

Nothing is committed until the save — the fields only bind to the component’s state.

The recent orders, details unfolding in place

The slot is not limited to a paragraph of text: each order opens to its line items, its total and its own action. :single="false" lets you keep two orders open side by side and compare them, and every amount runs through NabuXUI::formatNumber so it turns into Persian digits under the Persian locale.

Order #981 · Oct 6
Delivered 2 items in this order
  • Hand-stitched leather bag × 1 890,000 tomans
  • Desktop charger × 1 390,000 tomans
Total: 1,280,000 tomans
Order #967 · Oct 1
In transit 2 items in this order
  • Hand-painted ceramic mug × 2 450,000 tomans
Total: 450,000 tomans
Order #954 · Sep 24
Processing 4 items in this order
  • Linen notebook × 3 720,000 tomans
  • Brass bookmark set × 1 320,000 tomans
Total: 1,040,000 tomans

The first order arrives open (the open prop) so the stage never shows an empty accordion.

Important props

Important props
Prop Type Default What it does
single bool true Only one item open; achieved via a shared name on the details.
variant string joined joined or separated.
title (آیتم) string — The accordion-item title; it becomes the summary and the whole clickable row.
open (آیتم) bool false The item is open from the first render; keep just one open in single mode.

Snippet

<x-nx::accordion single>
    <x-nx::accordion-item title="سفارشم کی می‌رسد؟" open>…پاسخ…</x-nx::accordion-item>
    <x-nx::accordion-item title="کالا را می‌توانم برگردانم؟">…پاسخ…</x-nx::accordion-item>
</x-nx::accordion>

<x-nx::accordion :single="false" variant="separated">
    <x-nx::accordion-item title="درگاه پرداخت" open>
        <x-nx::switch label="پرداخت آنلاین" wire:model.live="state.pay.online" />
    </x-nx::accordion-item>
    <x-nx::accordion-item title="حساب تسویه">…فرم…</x-nx::accordion-item>
</x-nx::accordion>