This page as markdown: /radio-card.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

RadioCard

Status: stable

A selectable card option (radio-card) over Base UI RadioGroup + Radio. RadioGroup shares selection state; each RadioCard is a card with a radio indicator, title, and description. Add an icon to switch to the richer two-dimensional card, and a tone to give the selected state a semantic colour identity.

Keywords: radio-card, choice card, selection, option card

Usage

Use RadioCard for visual choice cards when users compare a small set of named options.

Best practices

Anatomy

Part Required Description
RadioCard yes One selectable option card.
RadioGroup no A grouped set of related choice cards.

Subcomponents

Name Type Description
RadioGroup Base UI RadioGroup props (value, defaultValue, onValueChange, name, disabled, readOnly, required) + className The group container that wraps the RadioCard cards and shares their selection state. Controlled via value + onValueChange; uncontrolled via defaultValue. Lays its cards out in a single column by default; override with className (e.g. 'grid sm:grid-cols-3') for a grid — the group is a flex column, so a grid-cols-* class alone does nothing.

Props

Name Type Default Description
value string — The unique value that pairs this card with the group's selected value.
title ReactNode — The card's primary label (rendered as text-title-sm).
description ReactNode — Optional supporting copy beneath the title (text-body-sm, muted).
trailing ReactNode — End-aligned on the title's line: a price, a delivery date, a count. The title takes the rest of the row.
icon ReactNode — Leading icon (e.g. a solid ). Its presence switches to the two-dimensional card — icon top-left, indicator top-right, copy below — and the glyph is rendered as a solid-fill icon in the tone colour.
tone "neutral" | "3" | "2" | "1" | "info" | "warning" "neutral" Semantic colour the selected state carries across the border, radio, and icon glyph. Neutral uses the primary ring with a muted wash.
disabled boolean false Dims the card and blocks selection. The group skips it during keyboard navigation.
titleClassName string — Merged onto the title span (default text-title-sm) — e.g. to tighten copy in a two-column layout.
descriptionClassName string — Merged onto the description span (default text-body-sm text-muted-foreground).

Variants

Tokens used

input, card, foreground, primary, muted, ring, muted-foreground, tone-3, tone-2, tone-1, tone-info, tone-warning

Motion

Accessibility

Related

Examples

Post type (tone + icon)

import { Icon, RadioCard, RadioGroup } from "@sableui/react"

<RadioGroup defaultValue="starter" className="grid sm:grid-cols-3"><RadioCard value="starter" tone="3" icon={<Icon name="plus" />} title="Starter" description="Free for one person" /><RadioCard value="studio" tone="2" icon={<Icon name="gem" />} title="Studio" description="For small teams" /><RadioCard value="business" tone="1" icon={<Icon name="image-stack" />} title="Business" description="SSO and audit log" /></RadioGroup>

Plan picker (plain)

import { RadioCard, RadioGroup } from "@sableui/react"

<RadioGroup defaultValue="pro"><RadioCard value="free" title="Free" description="For trying things out." /><RadioCard value="pro" title="Pro" description="For growing teams." /><RadioCard value="enterprise" title="Enterprise" description="Custom limits and support." /></RadioGroup>

With a disabled option

import { RadioCard, RadioGroup } from "@sableui/react"

<RadioGroup defaultValue="free"><RadioCard value="free" title="Free" description="For trying things out." /><RadioCard value="enterprise" title="Enterprise" description="Contact sales to enable." disabled /></RadioGroup>