Radio
Radio button inputs for selecting a single option from a set.
Examples
Basic Radio
blade
<x-plume::form
formData="{ 'plan': 'free' }">
<x-plume::form.group label="Plan" name="plan" model="plan">
<x-plume::form.radio value="free">Free</x-plume::form.radio>
<x-plume::form.radio value="pro">Pro</x-plume::form.radio>
<x-plume::form.radio value="enterprise">Enterprise</x-plume::form.radio>
</x-plume::form.group>
</x-plume::form>
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | null | The label text for the radio button. |
| name | string | null | HTML name attribute. Must be the same for all radios in a group. |
| id | string | null | HTML id attribute. Auto-generated if not provided. |
| model | string | null | AlpineJS model name for two-way binding. |
| value | string | '' | The value submitted when this radio is selected. |
| checked | bool | false | Whether this radio is initially selected. |
Usage
blade
<x-plume::form >
<x-plume::form.group label="Contact Method" model="contact">
<x-plume::form.radio value="email">Email</x-plume::form.radio>
<x-plume::form.radio value="phone">Phone</x-plume::form.radio>
</x-plume::form.group>
</x-plume::form>