Examples
Controlled
A working group — Alpine reports the selection (covers PF\u2019s controlled and uncontrolled sections).
Selected: one
With description
A description line under the label.
With body
Extra body content under the radio.
With description and body
Both together.
Documentation
Radio props
Parameters accepted by
{#include components/forms/radio ... /}. Model mode: pass
radio=<Radio> built in Java instead — the Java tab on each example shows the
builder.
| Name | Type | Description |
|---|---|---|
* id
|
String |
Wrapper id; inner input gets {id}-field.
|
* name
|
String | Shared name across radios in the same group — browser enforces single-selection by name. |
label
|
String | Visible label. Required for non-standalone radios. |
checked / disabled
|
boolean | Standard HTML form attributes. |
description
|
String | Muted second-line text. |
body
|
String (HTML) | Extra content under label/description. |
standalone
|
boolean | No visible label. |
Usage
Group by name. The browser enforces single-selection only if all radios in a group share the same
name.
Always pre-select one. Showing radios where nothing is selected forces users to commit to a choice they may not understand.