Components

Radio Group ​

Radio groups let users choose one option from a small set of mutually exclusive values.

Basic Usage ​

Keep radio options in a group so keyboard navigation and value selection remain mutually exclusive.

Supporting Descriptions ​

When the choice affects behavior, add a short supporting line so the options can stand on their own without extra nearby copy.

Disabled Options ​

Disable individual options when the broader choice is valid but one route is unavailable in the current context.

Layout and Error ​

Use horizontal layout for compact choices, and apply invalid state to the group when validation fails.

API ​

RadioGroup ​

Slots ​

NameDescription
labelGroup label
instructionsInstructions text
hintAlias for instructions
(default)pk-radio items

Props ​

NameDescription
ariaLabelType string | null
Default null
customErrorCustom validation message; also settable via setCustomValidity().
Type string | null
Default null
defaultValueDefault value — reflected as the value attribute.
Type string
disabledDisables the control and excludes it from constraint validation.
Type boolean
Default false
instructionsType string
invalidType boolean
Default false
isInvalidAlias for invalid.
labelType string
nameName submitted with form data.
Type string | null
Default null
orientationType PkRadioGroupOrientation
Default vertical
requiredMarks the control as required for form submission.
Type boolean
Default false

Methods ​

NameDescription
checkValidity()Runs constraint validation without showing the browser UI.
reportValidity()Runs constraint validation and shows the browser UI when invalid.
resetValidity()Clears custom errors and re-syncs validity state.
setCustomValidity(message: string)Sets or clears a custom validation message.

Events ​

NameDescription
@change—
@input—
@pk-change—

Custom States ​

NameDescriptionCSS selector
disabledThe control is disabled.:state(disabled)
invalidThe control currently fails constraint validation.:state(invalid)
optionalThe control is not required.:state(optional)
requiredThe control is required.:state(required)
user-invalidInvalid after the user has interacted with the control.:state(user-invalid)
user-validValid after the user has interacted with the control.:state(user-valid)
validThe control currently passes constraint validation.:state(valid)

CSS Parts ​

NameDescriptionCSS selector
form-controlForm control wrapper::part(form-control)
instructionsInstructions text::part(instructions)
labelLabel text::part(label)
radiosRadio items container::part(radios)

Radio ​

Slots ​

NameDescription
(default)Visible label text

Props ​

NameDescription
ariaLabelType string | null
Default null
checkedType boolean
Default false
disabledType boolean
Default false
forceDisabledSet by pk-radio-group when the group is disabled.
Type boolean
Default false
invalidType boolean
Default false
isInvalidAlias for invalid.
requiredType boolean
Default false
tabIndexType number
Default -1
valueType string

Methods ​

NameDescription
focusControl(options: FocusOptions)—

Events ​

NameDescription
@pk-radio-select—

CSS Parts ​

NameDescriptionCSS selector
baseRoot label element::part(base)
controlVisual radio circle::part(control)
indicatorIndicator container::part(indicator)
inputNative radio input::part(input)
Edit this page
Last updated: Sep 9, 2026, 7:18 PM