Skip to content
satin

Selectable radio

Pick one option from a few, each a card with a line of explanation and an icon.

Installation

Terminal
npm i @uisatin/ui
Import
import { SelectableRadio } from '@uisatin/ui/selectable-radio'

About 20.7 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The SelectableRadio component is a radio item of a RadioGroup drawn as a whole card, with no circle: the card is the radio and the selected one takes the primary border.

PropTypeDefault
value
string
—
title
ReactNode
—
description
ReactNode
—
icon
ReactNode
—
size
"sm""md"
"md"
disabled
boolean
false
className
string
—
ref
Ref<HTMLElement>
—
...props
ComponentProps<typeof RadioGroup.Item>

Other attributes go to the Radix RadioGroup.Item part

—

Accessibility

Each card is a Radix radio: a button with role="radio" and aria-checked, labelled by its title and described by its description. The icon tile is hidden. Put the cards in a RadioGroup and name the group.

KeyAction
TabMoves into the group, onto the checked card (or the first), and out again.
↑or↓or←or→Moves to the previous or next card and checks it, wrapping at the ends.
SpaceChecks the focused card.