Reflex Logo
Docs Logo
Library

/

Forms

/

Radio Group

A set of interactive radio buttons where only one can be selected at a time.

No Selection

The name prop is used to name the group. It is submitted with its owning form as part of a name/value pair.

When the required prop is True, it indicates that the user must check a radio item before the owning form can be submitted.

Example Form

Results:

{}

API Reference

rx.radio_group

High level wrapper for the RadioGroup component.

PropType | ValuesDefaultInteractive
items
Sequence
-
direction
"row" | "column" | ...
-
spacing
"0" | "1" | ...
-
size
"1" | "2" | ...
-
variant
"classic" | "surface" | ...
-
color_scheme
"tomato" | "red" | ...
-
high_contrast
bool
-
value
str
-
default_value
str
-
disabled
bool
-
name
str
-
required
bool
-

rx.radio_group.root

A set of interactive radio buttons where only one can be selected at a time.

PropType | ValuesDefaultInteractive
size
"1" | "2" | ...
-
variant
"classic" | "surface" | ...
-
color_scheme
"tomato" | "red" | ...
-
high_contrast
bool
-
value
str
-
default_value
str
-
disabled
bool
-
name
str
-
required
bool
-

Event Triggers

See the full list of default event triggers
TriggerDescription
on_changeFired when the value of the radio group changes.

rx.radio_group.item

An item in the group that can be checked.

PropType | ValuesDefaultInteractive
value
str
-
disabled
bool
-
required
bool
-

Built with Reflex