Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Radio

Choose one framework in a named radio group.

Preview

Live preview

Changes apply to this preview only.

Framework

Choose the stack for this project.

Library for building interfaces.
Full-stack React framework.
Complete web framework.

Selected value: react

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Sizes

sm, md and lg.

Open preview

Variants

The color of the selected circle.

Open preview

Orientation

Vertical by default, horizontal on demand.

Open preview

Usage

Use one shared group name for mutually exclusive choices and meaningful submitted values.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluRadioProps

Type source
PimoluRadioProps public API
NameTypeDefaultDescription
valueRequiredstring—Unique value for this option.
size"sm" | "md" | "lg" | undefined"md"Component size.
variant"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined"primary"Variant exposed by this component.
labelstring | undefined—Visible label associated with the control.
descriptionstring | undefined—Public Pimolu prop; see the source declaration for details.
onChangeChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined—Standard React/HTML attribute.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onClickMouseEventHandler<HTMLInputElement> | undefined—Standard React/HTML attribute.
disabledboolean | undefinedfalseStandard React/HTML attribute.
namestring | undefined—Standard React/HTML attribute.
requiredboolean | undefinedfalseStandard React/HTML attribute.
valueRequired

string

No default extracted.

Unique value for this option.

size

"sm" | "md" | "lg" | undefined

Default: "md"

Component size.

variant

"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined

Default: "primary"

Variant exposed by this component.

label

string | undefined

No default extracted.

Visible label associated with the control.

description

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

onChange

ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined

No default extracted.

Standard React/HTML attribute.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onClick

MouseEventHandler<HTMLInputElement> | undefined

No default extracted.

Standard React/HTML attribute.

disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

name

string | undefined

No default extracted.

Standard React/HTML attribute.

required

boolean | undefined

Default: false

Standard React/HTML attribute.

PimoluRadioGroupProps

Type source
PimoluRadioGroupProps public API
NameTypeDefaultDescription
namestring | undefined—Native form field name (automatically generated if omitted).
valuestring | undefined—Controlled selection.
defaultValuestring | undefined—Initial uncontrolled selection.
onValueChange((value: string) => void) | undefined—Called when an option is selected.
size"sm" | "md" | "lg" | undefined"md"Component size.
variant"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined"primary"Variant exposed by this component.
orientation"horizontal" | "vertical" | undefined"vertical"Public Pimolu prop; see the source declaration for details.
requiredboolean | undefinedfalseMarks every option as required. A native fieldset has no `required` attribute, so it is declared here and forwarded to each radio.
labelstring | undefined—Rendered inside a native legend.
descriptionstring | undefined—Group-level accessible description.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLFieldSetElement> | undefined—Standard React/HTML attribute.
disabledboolean | undefinedfalseStandard React/HTML attribute.
name

string | undefined

No default extracted.

Native form field name (automatically generated if omitted).

value

string | undefined

No default extracted.

Controlled selection.

defaultValue

string | undefined

No default extracted.

Initial uncontrolled selection.

onValueChange

((value: string) => void) | undefined

No default extracted.

Called when an option is selected.

size

"sm" | "md" | "lg" | undefined

Default: "md"

Component size.

variant

"primary" | "secondary" | "neutral" | "success" | "warning" | "danger" | undefined

Default: "primary"

Variant exposed by this component.

orientation

"horizontal" | "vertical" | undefined

Default: "vertical"

Public Pimolu prop; see the source declaration for details.

required

boolean | undefined

Default: false

Marks every option as required. A native fieldset has no `required` attribute, so it is declared here and forwarded to each radio.

label

string | undefined

No default extracted.

Rendered inside a native legend.

description

string | undefined

No default extracted.

Group-level accessible description.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLFieldSetElement> | undefined

No default extracted.

Standard React/HTML attribute.

disabled

boolean | undefined

Default: false

Standard React/HTML attribute.

Accessibility

  • Give the group context and each radio a label; verify arrow and Tab behavior.
Read the accessibility guide →