40+ landing page components for ReactBrowse now

Primitives

Radio Group

Radio button group for selecting a single option from a list. Supports descriptions, multiple sizes, and horizontal/vertical orientation.

Installation

npm install @trinkui/react

Import

import { RadioGroup } from "@trinkui/react";

Usage

Select a plan

Sizes

Small
Medium
Large

Horizontal Orientation

Orientation

Disabled

Disabled group

RadioGroup Props

PropTypeDefaultDescription
optionsrequired
RadioOption[]Array of radio options to render
value
stringControlled selected value
defaultValue
stringInitial uncontrolled value
onChange
(value: string) => voidCallback when selection changes
label
stringGroup label rendered as a fieldset legend
orientation
"vertical" | "horizontal""vertical"Layout direction of the radio items
size
"sm" | "md" | "lg""md"Size of the radio indicators and text
disabled
booleanfalseDisable all radio options
className
stringAdditional CSS classes

RadioOption Props

PropTypeDefaultDescription
labelrequired
stringDisplay label for the option
valuerequired
stringUnique value for the option
description
stringSecondary description text
disabled
booleanfalseDisable this individual option

Accessibility

  • Wraps options in a <fieldset> with a <legend> for the group label.
  • Uses native <input type="radio"> elements for full keyboard and screen reader support.
  • Arrow keys navigate between options within the group.
  • The checked state is conveyed via the native checked attribute.
  • Disabled options are excluded from the tab order.