Skip to content

Add RadioCard to @wordpress/ui #76850

@jameskoster

Description

@jameskoster

Follow up to #76104

Summary

This issue proposes adding a new RadioCard (name TBD) component to the @wordpress/ui package. RadioCard is a high-emphasis, low-density single-select control — a visually rich alternative to RadioControl for contexts where each option benefits from more prominent presentation (e.g. card-like styling with borders, visuals, and supplementary content).

Motivation

RadioControl works well for compact, text-only option lists, but product UIs often require more emphasis per option, e.g.:

  • Template selection — options carry thumbnails in a grid layout (example)
  • Credit card / payment method selectors — options carry logos, card names, and supplementary detail
  • Plan or tier selectors — options carry feature summaries or pricing breakdowns

Design

Image

RadioCard.Root

The group container. Renders a radiogroup role.

RadioCard.Item

An individual radio card option. Renders a styled card (<Card />?) with a hidden <input type="radio">

RadioCard.Label (required)

The primary text label for the option. Maps to the accessible name of the radio input. Must always be present — a RadioCard.Visual alone is not sufficient.

RadioCard.Description

Supporting text for the label.

RadioCard.Visual

A small decorative element region (icon, logo, thumbnail, status glyph) rendered adjacent to the label.

Constraints:

  • Intended for small presentational content only
  • Must not replace the primary RadioCard.Label
  • Purely decorative visuals should be hidden from assistive technologies (aria-hidden)
  • Any meaning conveyed visually must also be present in text (via label or supporting content)
  • Rich supplementary content belongs in RadioCard.SupportingContent, not here

RadioCard.SupportingContent

An optional region for rich supplementary content below the primary label.

Constraints:

  • May contain non-interactive content: text, badges, images, icons, layout primitives
  • Must not replace or obscure RadioCard.Label
  • Must follow the primary label in DOM order
  • Interactive elements are not permitted within this region
  • Meaningful content should be associated to the radio as descriptive text (aria-describedby); purely decorative content should be hidden from assistive technologies

Examples

Image

Layout

  • Default: vertical stack
  • Horizontal: row, items sized to content or equal-width
  • Grid / wrapping row: essential for tile/template-selection UIs

cc @WordPress/gutenberg-design for any feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design SystemIssues related to the system of combining components according to best practices.[Package] UI/packages/ui[Type] EnhancementA suggestion for improvement.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions