Skip to content

Radio Card

Get Ritla UI

A list row chosen with a radio in a group, with an icon at the start, a headline, supporting text and trailing text such as a price. The whole row is clickable, and the chosen card takes a border.

Ritla scan of this preview: 41 of 41 checks3 breakpointsScanned

Open in Figma

Preview

Mirrored is the same English content laid out right to left: it separates a mirroring bug from a translation one.

PreviewCode
EnglishMirroredArabic
LTR →

Installation

  1. Add the component

    npx ritla add radio-card

    Also works with shadcn: npx shadcn@latest add @ritla/radio-card

  2. Or copy by hand

    Installing by hand copies the component's source into your project. The source comes with a Ritla UI license, so the CLI is the short way to the same files.

Usage

radio-card.tsx
import { RadioGroup } from "@/components/ui/radio";import { RadioCard } from "@/components/ui/radio-card";<RadioGroup label="Plan" defaultValue="plus">  <RadioCard value="basic" leading={UserIcon} trailingText="Free">Basic</RadioCard>  <RadioCard value="plus" leading={StarIcon} trailingText="29 / month">Plus</RadioCard></RadioGroup>

Examples

Circle at the start

leading="radio" puts the circle at the start of the row.

EnglishMirroredArabic
LTR →

API reference

RadioCard

PropTypeDefaultDescription
valuestringNoneThe option's value in its group.
childrenReactNodeNoneFigma's Headline.
overline / description / trailingTextReactNodeNoneFigma's Overline, Supporting text and Trailing text.
leadingIconComponent | ReactNode | "radio"NoneFigma's Leading type.
disabledbooleanNoneState = Disabled.

Accessibility

Keyboard

Keys are written for left-to-right. In right-to-left the arrow keys swap: the one pointing toward the reading direction moves forward.

KeyAction
ArrowDownArrowUpBetween cards, selecting; Tab leaves the group.

ARIA

  • Each row's circle is role="radio", named by the headline and linked to the supporting text.

Arabic and RTL notes

Mirrors

  • The icon sits at the start (the right), the circle at the end (the left).

Does not mirror

  • Non-directional icons don't mirror.
Numerals
Prices in the trailing text follow numerals through formatNumber.
Arabic typography
The headline is body-16 Medium.

Checks it passes

The Ritla checks this component satisfies by construction. Used as documented, it does not bring these defects onto your page.

  • R050Arabic text falling back past the declared font family (measured, declared, or a webfont that failed to load)
  • R051letter-spacing applied to Arabic text (breaks the connected script)
  • R042Clipped text: content wider than its box with overflow hidden and no ellipsis
  • R043Fixed-pixel-width container whose Arabic text exceeds the space