HomeGetting StartedColor SystemTypographySpacingIconographyLayoutInstallationUsageAngularBlazorReactSvelteVueThemingTypographyCustomizationCSS-Only ComponentsFormsIconsIllustrationsAccessibilityGlobal ConfigurationTailwind CSSSass LibraryForge MCP ServerDropdown OptionsFocus Indicator ClippingAll componentsButtonButton AreaChipFloating Action ButtonIcon ButtonSplit ButtonAutocompleteButton ToggleCalendarCheckboxChip FieldColor PickerDate PickerDate Range PickerFile PickerLabelRadioSelectSliderSwitchText FieldTime PickerApp BarApp LauncherDrawerMenuPaginatorSkip LinkStepperTabsView SwitcherAccordionApp LayoutCardDividerExpansion PanelScaffoldSplit ViewStackStructured CardToolbarBadgeBannerBusy IndicatorCircular ProgressDialogInline MessageLinear ProgressPage StateSkeletonToastTooltipAvatarIconKeyLabel ValueListMeterSecretTableTimelineTimestampTreeKeyboard ShortcutPopoverIntroductionColorTypographySpacingShapeBorderElevationLayeringAnimationUsageIcon LibraryBlocksRoadmapChangelogBlog

Radio

The Forge Radio component is used to create a form input where only one out of a set of values should be selected.

Option oneOption two

Overview

Radio buttons are selection controls that allow users to select exactly one option from a set of mutually exclusive choices. They appear as small circles that display a filled dot when selected. When a user selects a radio button, any previously selected option in the same group is automatically deselected, ensuring only one choice remains active at a time.

Usage

forge-radio lets a user select a single option from a visible set; group related radios so only one can be checked at a time, either informally by sharing a name or formally inside a forge-radio-group. It’s one of three selection controls — reach for a checkbox when more than one option can be selected, or a switch to turn a single item on or off. When screen space is tight or the set is long, a select compacts the same choice into a closed control.

Rules

Do
Use radios when the user needs to compare all available options at a glance.Order options logically — alphabetical, numeric, or chronological.Start each option with a capital letter and use sentence case.Group related radios in a forge-radio-group with a legend describing the choice.Use clear, descriptive labels that communicate exactly what will happen when the option is selected.Provide a default selection when one option is most common or recommended.
Don't
Don't use radios for a large set of options — use a select instead.Don't use a radio group when more than one option can be selected — use checkboxes instead.Don't use a single radio for a single yes/no choice — use a checkbox instead.

Grouped options

Wrap related radios in a forge-radio-group (with a forge-label legend describing the choice) so they’re announced as a set and can be disabled together.

Radios grouped inside a forge-radio-group with a shared legend.

Grouping without forge-radio-group

forge-radio-group isn’t required — radios sharing a name already form an implicit group:

<forge-radio name="default">Option 1</forge-radio>
<forge-radio name="default">Option 2</forge-radio>

For a custom layout that still needs to be interpreted as a group, set role="radiogroup" on a plain ancestor element instead:

<div role="radiogroup" aria-label="Choose an option">
  <forge-radio name="default">Option 1</forge-radio>
  <forge-radio name="default">Option 2</forge-radio>
</div>

Label position

Set label-position to start to place the label before the radio instead of after it.

Label position set to start.

Disabled and read-only

disabled radios can’t be focused; readonly radios can be focused but not changed.

Disabled radios (left) can't be focused; read-only radios (right) can be focused but not changed.

Dense

Set dense to reduce the radio’s size and spacing.

Dense reduces the radio's size and spacing.

The Forge Radio component is used to create a form input where only one out of a set of values should be selected.

import "@tylertech/forge/radio";
Properties
PropertyAttributeTypeDefaultDescription
checkedcheckedbooleanfalseGets/sets whether the radio is checked.
defaultCheckeddefault-checkedbooleanfalseGets/sets whether the radio is checked by default.
valuevaluestring'on'Gets/sets the value of the radio when submitted as part of a form.
densedensebooleanfalseControls whether the radio is dense.
disableddisabledbooleanfalseControls whether the radio is disabled.
requiredrequiredbooleanfalseControls whether the radio is required.
readonlyreadonlybooleanfalseControls whether the radio is read-only.
labelPositionlabel-positionRadioLabelPosition'end'Controls whether the label appears before or after the radio.
Slots
NameDescription
(default)This is a default/unnamed slot for the label text.
CSS Parts
NameDescription
::part(root)Styles the radio's root element.
::part(background)Styles the border and background of the radio.
::part(focus-indicator)Styles the focus indicator of the radio.
::part(state-layer)Styles the state layer of the radio.
CSS Custom Properties
NameDescription
--forge-radio-primary-colorThe primary color of the radio button when checked.
--forge-radio-inactive-colorThe color of the radio button when unchecked.
--forge-radio-sizeThe size of the radio button in the inline and block directions.
--forge-radio-widthThe width of the radio button.
--forge-radio-heightThe height of the radio button.
--forge-radio-border-widthThe width of the radio button's border.
--forge-radio-unchecked-border-colorThe color of the radio button's border when unchecked.
--forge-radio-checked-border-colorThe color of the radio button's border when checked.
--forge-radio-backgroundThe background of the radio button.
--forge-radio-shapeThe shape of the radio button.
--forge-radio-mark-sizeThe size of the radio button's mark in the inline and block directions.
--forge-radio-mark-widthThe width of the radio button's mark.
--forge-radio-mark-heightThe height of the radio button's mark.
--forge-radio-mark-colorThe color of the radio button's mark.
--forge-radio-gapThe gap between the radio button and its label.
--forge-radio-justifyThe alignment of the radio button and its label in the inline direction.
--forge-radio-alignThe alignment of the radio button and its label in the block direction.
--forge-radio-directionThe direction of the radio button and its label.
--forge-radio-state-layer-sizeThe size of the radio button's state layer in the inline and block directions.
--forge-radio-state-layer-widthThe width of the radio button's state layer.
--forge-radio-state-layer-heightThe height of the radio button's state layer.
--forge-radio-state-layer-uncheckedcolor - The color of the radio button's state layer when unchecked.
--forge-radio-state-layer-checked-colorThe color of the radio button's state layer when checked.
--forge-radio-state-layer-shapeThe shape of the radio button's state layer.
--forge-radio-state-layer-dense-sizeThe size of the radio button's state layer when dense.
--forge-radio-state-layer-dense-widthThe width of the radio button's state layer when dense.
--forge-radio-state-layer-dense-heightThe height of the radio button's state layer when dense.
--forge-radio-disabled-opacityThe opacity of the radio button when disabled.
--forge-radio-animation-durationThe duration of the radio button's animations.
--forge-radio-animation-timing-functionThe timing function of the radio button's animations.
--forge-radio-animation-delayThe delay of the radio button's animations.

Keyboard reachability

Ensure every radio is reachable by the tab key and can be selected with the keyboard, not just a pointer.

Group labeling

Radios need to be interpreted as a group by assistive technology, and the group itself needs an accessible name — whichever grouping method you use:

  • Grouping by a shared name attribute alone doesn’t provide a group label on its own — pair it with one of the two options below.
  • A plain ancestor element with role="radiogroup" needs an aria-label describing the group’s purpose.
  • <forge-radio-group> needs a <forge-label legend> (or equivalent) to provide that label.
Loading Forge chat…