Skip to main content

Radio

Radio component | Improved version of standard HTML radio element shadow

The radio element is a modified version of the standard HTML radio element, enhanced with styles to achieve a more visually consistent user interface across devices. It works similarly to a standard radio button and allows users to select one from a set of options. It is used inside the radio group element to add alignment and group them together.

Basic Usage

Inline

Adding the inline property arranges the elements in a horizontal layout.

Editing styles

color

Using the color property it is possible to change the color of the radio element.

Attributes and Properties

color

DescriptionThe color to use from your application's color palette. The default options are "primary", "complete", "success", "warning", "warning" and "neutral". For more information, go to: theming.
Attributecolor
Type"danger." | "neutral" | "primary" | "success" | "complete" | "warning" | string | undefined
Defaultundefined

checked

DescriptionIf true, the option is selected.
Attributechecked
Typeboolean
Defaultfalse

disabled

DescriptionIf true, the option cannot be selected.
Attributedisabled
Typeboolean
Defaultfalse

indeterminate

DescriptionIf true, it sets the default state of the radio element to neutral, i.e. neither true nor false.
Attributeindeterminate
Typeboolean
Defaultfalse

name

DescriptionSpecifies the name of the radio element.
Attributename
Typestring
Defaultthis.inputId

value

DescriptionThe value of the radio element.
Attributevalue
Typestring | undefined
Defaultundefined

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

NameDescription
--wj-border-radius-circleDefines the size of the roundness of the element.
--wj-radio-margin-bottomDefines the bottom offset of the element.
--wj-radio-margin-inlineRight and left offset of the radio element.
--wj-radio-margin-topTop offset of the radio element.

Slots

No slots available for this component.