Base Pure CSS

Radio group

A fieldset of native radios with a legend, per-option descriptions and vertical/horizontal layout — like picking a billing plan; arrow keys roam the options.

Real scenarios

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

The plan upgrade, priced as you pick

One fieldset, one legend, three plans — each option carries its own description so the choice explains itself. The radio is native, so the arrow keys roam the group and the screen reader announces it under its legend; wire:model.live re-renders the summary with Persian digits straight from the locale.

Your subscription plan

Selected: Pro · 490,000 tomans / month

Shipping method — the courier is off in Rome

The horizontal row for a short list: the cart ships to Rome, so the bike courier arrives disabled with its reason instead of vanishing. The delivery estimate under the group follows the pick live.

How should we ship order #981?

Arrives Post — priority mail · about 3–5 working days

Storefront display settings

Two small groups of one settings card: digits (Persian or Latin) and the price unit (tomans or rials). The preview line runs the real NabuXUI::formatNumber, so what you read is what the storefront will print.

Digits
Price unit

Preview of a 1,250,000-toman item: ۱٬۲۵۰٬۰۰۰ tomans

Important props

Important props
Prop Type Default What it does
options array [] ['monthly' => 'Monthly'] or a list of ['value' => …, 'label' => …] with optional description (under the label) and disabled keys.
legend string null The group’s legend inside the fieldset; both visible and the group’s accessible name.
orientation string vertical Vertical (default) or horizontal; the horizontal row wraps when space runs out.
value / name string null / خودکار The selected option for the server render — pass it beside wire:model so checked comes from the truth; name falls back to the wire:model path.

Snippet

<x-nx::radio-group legend="پلن اشتراک" :value="$plan" wire:model.live="state.plan" :options="[
    ['value' => 'pro', 'label' => 'حرفه‌ای', 'description' => 'سفارش نامحدود و درگاه پرداخت'],
    ['value' => 'business', 'label' => 'کسب‌وکار', 'description' => 'انبار چندشعبه‌ای'],
]" />

<x-nx::radio-group legend="روش ارسال" orientation="horizontal" :value="$shipping" wire:model.live="state.shipping" :options="[
    ['value' => 'post', 'label' => 'پست پیشتاز'],
    ['value' => 'courier', 'label' => 'پیک موتوری', 'description' => 'فقط استانبول و بورسا', 'disabled' => true],
]" />