Radio

A radio input allows users to select only one option from a number of choices. Radio is generally displayed in a radio group.

Neutral selected states

When the platform-dst-tokens-finesse feature flag is enabled, this component uses the new neutral treatment for selected states.

Installation

Package installation information
Installyarn add @atlaskit/radio
SourceBitbucket.org, (opens new window)
npm@atlaskit/radio, (opens new window)
Bundleunpkg.com, (opens new window)

Props

analyticsContext

Description

Additional information to be included in the context of analytics events that come from radio.

Type{ [x: string]: any; }

ariaLabel

Description

The aria-label attribute associated with the radio element.

Typestring

createAnalyticsEvent

Description

You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next and integrated in the component

Type(payload: AnalyticsEventPayload) => UIAnalyticsEvent

isChecked

Description

Set the field as checked.

Typeboolean

isDisabled

Description

Makes a Radio field unselectable when true. Overridden by isDisabled prop of RadioGroup.

Typeboolean

isInvalid

Description

Marks this as an invalid field.

Typeboolean

isRequired

Description

Marks this as a required field.

Typeboolean

label

Description

The label value for the input rendered to the DOM.

Typestring | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal

labelId

Description

This sets the aria-labelledby attribute. It sets an accessible name for the radio, for people who use assistive technology. Use of a visible label is highly recommended for greater accessibility support.

Typestring

onChange

Description

onChange event handler, passed into the props of each Radio Component instantiated within RadioGroup.

Type(e: ChangeEvent<HTMLInputElement>, analyticsEvent: UIAnalyticsEvent) => void

ref

Description
No description.
Type((instance: HTMLInputElement) => void) | RefObject<HTMLInputElement>

testId

Description

A testId prop is provided for specified elements, which is a unique string that appears as a data attribute data-testid in the rendered code, serving as a hook for automated tests we have 2 different testid generated based on the one you pass to the Radio component:

  • {testId}--radio-input to check if it got changed to checked/unchecked.
  • {testId}--radio-label to click the input.
Typestring

value

Description

Field value.

Typestring
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License