Skip to content

Radio & Radio Group

Allows users to select a single option from a predefined set.

First release: 1.0.0 Latest update: July 1, 2025 Current version: 1.0.0

React Angular Vue Svelte HTML

Import

import { PlusRadio & Radio Group } from '@plusui/react';
import { PlusRadio & Radio GroupComponent } from '@plusui/angular';
import { PlusRadio & Radio Group } from '@plusui/vue';
import PlusRadio & Radio Group from '@plusui/svelte';
<script src="https://cdn.jsdelivr.net/npm/@plusui/core"></script>

Package

@plusui/react
@plusui/angular
@plusui/vue
@plusui/svelte
@plusui/core

Docs

Changelog

Radio & radio group Changelog

Recent changes and updates for the radio & radio group component

📝

No entries found

No changelog entries found for radio & radio group component.

The Radio component (plus-radio) allows users to select one option from a set. It should always be used within a Radio Group (plus-radio-group) which manages the selection state and provides grouping for accessibility and form submission.

Radio - anatomy

Radios must be contained within a plus-radio-group. The group manages the selected value.

AppleBananaOrange
Show code

Set the size prop on the plus-radio-group to control the size of all radio buttons within it.

SmallSmallMediumMediumLargeLarge
Show code

Set the disabled attribute on the plus-radio-group to disable all radios within it, or on an individual plus-radio.

Group Disabled AGroup Disabled BEnabled AIndividually Disabled BEnabled C
Show code

Set the readonly attribute on individual plus-radio components to make them non-interactive but visually appear normal.

Normal AReadonly B (Checked)Readonly C
Show code

Set the error attribute on the plus-radio-group to indicate a validation error.

Option AOption B
Show code

Listen to the plus-group-change event to respond when the selected value changes.

Option 1Option 2Option 3
Show code
Show console

Use the orientation prop on plus-radio-group to arrange radios vertically or horizontally.

Horizontal (Default)

Horizontal AHorizontal B

Vertical

Vertical AVertical B
Show code
Radio - layout spacing Radio - light & dark mode
  • Keyboard Behavior:
    • Radio groups are part of the tab order. Users can Tab into the group.
    • Once focus is inside the group (on the selected radio), ArrowUp / ArrowLeft move focus and selection to the previous radio, wrapping around.
    • ArrowDown / ArrowRight move focus and selection to the next radio, wrapping around.
    • Space checks the focused radio button (if not already checked).
    • Tab moves focus out of the radio group.
  • Screen Reader:
    • The plus-radio-group uses role="radiogroup" and should have an accessible label (e.g., via aria-labelledby if an external label exists, or implicitly via a <legend> if used in a <fieldset>). The name prop can serve as an implicit label reference if needed.
    • Each plus-radio has role="radio", aria-checked reflecting its state, and is implicitly labelled by its slotted content.
    • Disabled radios have aria-disabled="true".
  • Required Developer Actions:
    • Always wrap plus-radio elements within a plus-radio-group.
    • Provide a meaningful name for the plus-radio-group for form submission and accessibility.
    • Ensure the plus-radio-group has an accessible label (e.g., by associating it with a visible label using aria-labelledby or wrapping it in a fieldset with a legend).
    • Ensure each plus-radio has a unique value within the group.
    • Provide clear label text for each plus-radio (via slot or text prop).
NameTypeDefaultDescriptionRequired
size'sm' | 'md' | 'lg''md'Size of the radio button. Typically controlled by the group.No
textstringundefinedText label for the radio. Use default slot for complex labels.No
checkedbooleanfalseWhether the radio is checked. Controlled by the group.No
errorbooleanfalseWhether the radio shows error styling. Controlled by group.No
disabledbooleanfalseDisables the radio. Can be set individually or by group.No
readonlybooleanfalseMakes the radio non-interactive but not visually disabled.No
namestring''The name attribute. Controlled by the group.No
requiredbooleanfalseIf the radio is required. Typically set on the group.No
valuestring''The value associated with this radio option.Yes
NamePayload TypeDescription
plus-changeCustomEvent<void>Fired when the checked state changes.
plus-focusCustomEvent<void>Fired when the radio receives focus.
plus-blurCustomEvent<void>Fired when the radio loses focus.
NameDescription
(default)The label content for the radio.
NameDescription
radioThe native <input type="radio"> element.

NameTypeDefaultDescriptionRequired
namestring''Name for the group, passed to radios and used for form submission.Yes
valuestring''The value of the currently selected radio in the group.No
disabledbooleanfalseDisables all radio buttons within the group.No
requiredbooleanfalseMakes the radio group required in a form.No
size'sm' | 'md' | 'lg''md'Sets the size for all radio buttons within the group.No
errorbooleanfalseApplies error styling to all radios within the group.No
orientation'horizontal' | 'vertical''horizontal'Arrangement direction of the radio buttons.No
NamePayload TypeDescription
plus-group-changeCustomEvent<{value: string}>Fired when the selected value of the group changes.
NameDescription
(default)Contains the plus-radio elements for the group.
NameDescription
baseThe main container element.

Join the Community

Plus UI is built by the community. Join us on our platforms to contribute, get help, and stay up to date.