Skip to main content

RadioInput

Introduction

The single radio input, shown here with a label. There are no error styles as radio buttons should be part of a fieldset.

Note Radio buttons do not make sense as stand-alone components and should normally be part of a fieldset.

Live demo

CSS custom properties

Use these properties to theme radio-button colours. Linked properties follow their fallback unless they are set directly. See Theming for how to apply custom properties.

PropertyTypeDefault valueFallback valueDescription
--rpf-input-radio-dot-colorLinkedvar(--rpf-input-color)Checked radio dot colour
--rpf-input-background-colorIndependentvar(--rpf-white)Radio background and the gap around the checked dot
--rpf-input-colorIndependentvar(--rpf-text-primary)Fallback colour for the checked radio dot
--rpf-input-color-disabledIndependentvar(--rpf-grey-500)Disabled label and checked radio dot colour
--rpf-input-color-errorIndependentvar(--rpf-alert-error)Radio border and checked-dot colour in an error state
--rpf-label-text-color-disabledLinkedvar(--rpf-input-color-disabled)Disabled label text colour

Implementation: