Components
You’re browsing the documentation for an old version of Flux. Go to v2.x ->

Radio

Select one option from a set of mutually exclusive choices. Perfect for single-choice questions and settings.

Select your payment method
Credit Card
Paypal
Bank transfer
Copy to clipboard
<flux:radio.group wire:model="payment" label="Select your payment method">    <flux:radio value="cc" label="Credit Card" checked />    <flux:radio value="paypal" label="Paypal" />    <flux:radio value="ach" label="Bank transfer" /></flux:radio.group>

With descriptions

Align descriptions for each radio directly below its label.

Role
Administrator Administrator users can perform any action.
Editor Editor users have the ability to read, create, and update.
Viewer Viewer users only have the ability to read. Create, and update are restricted.
<flux:radio.group label="Role">    <flux:radio        name="role"        value="administrator"        label="Administrator"        description="Administrator users can perform any action."        checked    />    <flux:radio        name="role"        value="editor"        label="Editor"        description="Editor users have the ability to read, create, and update."    />    <flux:radio        name="role"        value="viewer"        label="Viewer"        description="Viewer users only have the ability to read. Create, and update are restricted."    /></flux:radio.group>

Within fieldset

Group radio inputs inside a fieldset and provide more context with descriptions for each radio option.

Role
Administrator Administrator users can perform any action.
Editor Editor users have the ability to read, create, and update.
Viewer Viewer users only have the ability to read. Create, and update are restricted.
<flux:fieldset>    <flux:legend>Role</flux:legend>    <flux:radio.group>        <flux:radio            value="administrator"            label="Administrator"            description="Administrator users can perform any action."            checked        />        <flux:radio            value="editor"            label="Editor"            description="Editor users have the ability to read, create, and update."        />        <flux:radio            value="viewer"            label="Viewer"            description="Viewer users only have the ability to read. Create, and update are restricted."        />    </flux:radio.group></flux:fieldset>

Segmented

A more compact alternative to standard radio buttons.

Role Admin Editor Viewer
<flux:radio.group wire:model="role" label="Role" variant="segmented">    <flux:radio label="Admin" />    <flux:radio label="Editor" />    <flux:radio label="Viewer" /></flux:radio.group>

You can also use the size="sm" prop to make the radios smaller.

Role Admin Editor Viewer
<flux:radio.group wire:model="role" label="Role" variant="segmented" size="sm">    <flux:radio label="Admin" />    <flux:radio label="Editor" />    <flux:radio label="Viewer" /></flux:radio.group>

Segmented with icons

Combine segmented radio buttons with icon prefixes.

Role Admin Editor Viewer
<flux:radio.group wire:model="role" variant="segmented">    <flux:radio label="Admin" icon="wrench" />    <flux:radio label="Editor" icon="pencil-square" />    <flux:radio label="Viewer" icon="eye" /></flux:radio.group>

Radio cards

A bordered alternative to standard radio buttons.

Shipping
Standard
4-10 business days
Fast
2-5 business days
Next day
1 business day
<flux:radio.group wire:model="shipping" label="Shipping" variant="cards" class="max-sm:flex-col">    <flux:radio value="standard" label="Standard" description="4-10 business days" checked />    <flux:radio value="fast" label="Fast" description="2-5 business days" />    <flux:radio value="next-day" label="Next day" description="1 business day" /></flux:radio.group>

You can swap between vertical and horizontal card layouts by conditionally applying flex-col based on the viewport.

Copy to clipboard
<flux:radio.group ... class="max-sm:flex-col">    <!-- ... --></flux:radio.group>

Vertical cards

You can arrange a set of radio cards vertically by simply adding the flex-col class to the group container.

Shipping
Standard
4-10 business days
Fast
2-5 business days
Next day
1 business day
<flux:radio.group label="Shipping" variant="cards" class="flex-col">    <flux:radio value="standard" label="Standard" description="4-10 business days" />    <flux:radio value="fast" label="Fast" description="2-5 business days" />    <flux:radio value="next-day" label="Next day" description="1 business day" /></flux:radio.group>

Cards with icons

You can arrange a set of radio cards vertically by simply adding the flex-col class to the group container.

Shipping
Standard
4-10 business days
Fast
2-5 business days
Next day
1 business day
<flux:radio.group label="Shipping" variant="cards" class="max-sm:flex-col">    <flux:radio value="standard" icon="truck" label="Standard" description="4-10 business days" />    <flux:radio value="fast" icon="cube" label="Fast" description="2-5 business days" />    <flux:radio value="next-day" icon="clock" label="Next day" description="1 business day" /></flux:radio.group>

Cards without indicators

For a cleaner look, you can remove the radio indicator using :indicator="false".

Shipping
Standard
4-10 business days
Fast
2-5 business days
Next day
1 business day
<flux:radio.group label="Shipping" variant="cards" :indicator="false" class="max-sm:flex-col">    <flux:radio value="standard" icon="truck" label="Standard" description="4-10 business days" />    <flux:radio value="fast" icon="cube" label="Fast" description="2-5 business days" />    <flux:radio value="next-day" icon="clock" label="Next day" description="1 business day" /></flux:radio.group>

Custom card content

You can compose your own custom cards through the flux:radio component slot.

Shipping
Standard
4-10 business days
Fast
2-5 business days
Next day
1 business day
<flux:radio.group label="Shipping" variant="cards" class="max-sm:flex-col">    <flux:radio value="standard" checked>        <flux:radio.indicator />        <div class="flex-1">            <flux:heading class="leading-4">Standard</flux:heading>            <flux:subheading size="sm">4-10 business days</flux:subheading>        </div>    </flux:radio>    <flux:radio value="fast">        <flux:radio.indicator />        <div class="flex-1">            <flux:heading class="leading-4">Fast</flux:heading>            <flux:subheading size="sm">2-5 business days</flux:subheading>        </div>    </flux:radio>    <flux:radio value="next-day">        <flux:radio.indicator />        <div class="flex-1">            <flux:heading class="leading-4">Next day</flux:heading>            <flux:subheading size="sm">1 business day</flux:subheading>        </div>    </flux:radio></flux:radio.group>
Copyright © 2025 Wireable LLC ·Terms of Service
Built with by
Caleb Porzio and Hugo Sainte-Marie