Skip to content
nexubDesign System
v2.4.0

Components · Form Controls

Radio Card

BetaSince v1.6.0

A radio group where each option is a whole card: title, description and optional icon, one choice.

import { RadioCard } from '@nexub/react';

Usage

Use it for
  • Two to six options that each need a sentence of explanation, like plans or regions.

  • A choice important enough to deserve the space.

Use something else for
  • Short labels with no description: use RadioGroup.

  • More than six options: use Select or Combobox.

  • Cards that hold links or buttons: the whole card is the control, so use Card with CardLink.

Examples

Plan picker

Columns

Two columns from the sm breakpoint up, one below.

Disabled

Disable one card, or pass `disabled` to the group to disable all of them.

Props

Props
PropTypeDefaultDescription
RadioCardGroup columns1 | 2 | 3 | 41Grid columns. Collapses to one column on narrow screens.
RadioCardGroup value / defaultValue / onValueChangestring—Radix RadioGroup props; the group also takes disabled, name, required.
valuerequiredstring—The option this card selects.
titlerequiredReactNode—The card’s accessible name.
descriptionReactNode—Secondary text, exposed as the accessible description.
iconReactNode—Leading icon. Turns primary when selected.
childrenReactNode—Extra content under the description. Keep it non-interactive: the whole card is the control.
disabledbooleanfalseDisables this card only.

Accessibility

ARIA roles

radiogroupradio (each card)

Keyboard

  • Tab

    Moves focus into the group, to the selected card.

  • Arrow keys

    Move between cards and select.

  • Space

    Selects the focused card.

Screen reader

  • The title is the accessible name and the description is the accessible description.

  • Give the group an `aria-label` or `aria-labelledby`.

On iOS & Android