Selectable cards for choosing one option with an explanation
pnpm dlx shadcn@latest add https://notchset.dev/r/radio-cards.jsonOne choice from a few, each with a line to explain it.
Every shadcn style · one file
Import it and pass your content. The props that matter most are listed next.
"use client";
import { RadioCards } from "@/components/ui/notchset/radio-cards";
/*
* One choice of a few, at its real size: plans as cards across, each with what it costs at its foot; who sees a project as
* rows with detail, one locked and saying why (arrow keys skip it); a label colour as swatches named in words.
*/
const SETS = {
plans: {
label: "Plan",
chosen: "plus",
reason: "Opens once billing has moved",
options: [
{ value: "free", label: "Free", hint: "3 seats · 1 workspace", meta: "$0" },
{ value: "plus", label: "Plus", hint: "Unlimited projects", meta: "$24 / seat" },
{ value: "scale", label: "Scale", hint: "SSO · 50 seats", meta: "$64 / seat" },
],
},
visibility: {
label: "Who sees this project",
chosen: "team",
reason: "Needs an admin",
options: [
{ value: "me", label: "Only me", hint: "Hidden from every report", meta: "1 person" },
{ value: "team", label: "My team", hint: "Shows in the team's views", meta: "8 people" },
{ value: "everyone", label: "Everyone", hint: "Anyone in the workspace", meta: "34 people" },
],
},
};
const COLOURS = [
{ value: "orange", label: "Orange", color: "var(--ns-cat-1)" },
{ value: "green", label: "Green", color: "var(--ns-cat-2)" },
{ value: "violet", label: "Violet", color: "var(--ns-cat-3)" },
{ value: "amber", label: "Amber", color: "var(--ns-cat-4)" },
{ value: "pink", label: "Pink", color: "var(--ns-cat-5)" },
];
type Which = keyof typeof SETS;
export default function RadioCardsDemo() {
const variant = "cards" as "cards" | "list" | "swatch";
const prices = true;
const unavailable = false;
const which = "plans" as Which;
const group = SETS[which];
if (variant === "swatch")
return <RadioCards variant="swatch" label="Label colour" defaultValue="violet" options={COLOURS.map((c, i) => (unavailable && i === COLOURS.length - 1 ? { ...c, disabled: true, reason: "Only an admin can change it" } : c))} />;
return (
<RadioCards
variant={variant}
label={group.label}
columns={variant === "list" ? 1 : "auto"}
defaultValue={group.chosen}
className={variant === "list" ? "w-fit max-w-full" : "w-[520px] max-w-full"}
options={group.options.map((p, i) => ({
value: p.value,
label: p.label,
hint: p.hint,
meta: prices ? p.meta : undefined,
...(unavailable && i === group.options.length - 1 ? { disabled: true, reason: group.reason } : {}),
}))}
/>
);
}"use client";
import { RadioCards } from "@/components/ui/notchset/radio-cards";
/*
* One choice of a few, at its real size: plans as cards across, each with what it costs at its foot; who sees a project as
* rows with detail, one locked and saying why (arrow keys skip it); a label colour as swatches named in words.
*/
const SETS = {
plans: {
label: "Plan",
chosen: "plus",
reason: "Opens once billing has moved",
options: [
{ value: "free", label: "Free", hint: "3 seats · 1 workspace", meta: "$0" },
{ value: "plus", label: "Plus", hint: "Unlimited projects", meta: "$24 / seat" },
{ value: "scale", label: "Scale", hint: "SSO · 50 seats", meta: "$64 / seat" },
],
},
visibility: {
label: "Who sees this project",
chosen: "team",
reason: "Needs an admin",
options: [
{ value: "me", label: "Only me", hint: "Hidden from every report", meta: "1 person" },
{ value: "team", label: "My team", hint: "Shows in the team's views", meta: "8 people" },
{ value: "everyone", label: "Everyone", hint: "Anyone in the workspace", meta: "34 people" },
],
},
};
const COLOURS = [
{ value: "orange", label: "Orange", color: "var(--ns-cat-1)" },
{ value: "green", label: "Green", color: "var(--ns-cat-2)" },
{ value: "violet", label: "Violet", color: "var(--ns-cat-3)" },
{ value: "amber", label: "Amber", color: "var(--ns-cat-4)" },
{ value: "pink", label: "Pink", color: "var(--ns-cat-5)" },
];
type Which = keyof typeof SETS;
export default function RadioCardsDemo() {
const variant = "cards" as "cards" | "list" | "swatch";
const prices = true;
const unavailable = false;
const which = "plans" as Which;
const group = SETS[which];
if (variant === "swatch")
return <RadioCards variant="swatch" label="Label colour" defaultValue="violet" options={COLOURS.map((c, i) => (unavailable && i === COLOURS.length - 1 ? { ...c, disabled: true, reason: "Only an admin can change it" } : c))} />;
return (
<RadioCards
variant={variant}
label={group.label}
columns={variant === "list" ? 1 : "auto"}
defaultValue={group.chosen}
className={variant === "list" ? "w-fit max-w-full" : "w-[520px] max-w-full"}
options={group.options.map((p, i) => ({
value: p.value,
label: p.label,
hint: p.hint,
meta: prices ? p.meta : undefined,
...(unavailable && i === group.options.length - 1 ? { disabled: true, reason: group.reason } : {}),
}))}
/>
);
}components/ui/notchset/radio-cards.tsx
LevelAtom: uses no other piece.
Made ofTooltip
Free, no account or key. One command for every shadcn style. With the @notchset registry added, @notchset/<name> works too.
Works with React 18.3 or 19 on Tailwind CSS v4, in any shadcn project. What's tested
pnpm add lucide-react@^1The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
options–
RadioCard<V>[]the choices, one card each: its value, title and optional detail
value–
V | nullthe chosen option, null for none yet (controlled), with onValueChange
defaultValue–
V | nullthe option chosen first when it keeps its own choice (uncontrolled); none without one
onValueChange–
(v: V) => voidcalled with the value of the card picked
label–
stringNames the group for screen readers ("Where your data comes from") where nothing visible names it.
legend–
React.ReactNodeThe visible question over the group ("Notify me about"): the group becomes a fieldset named by it, and `label` is not used, so it is named once.
columns1
1 | 2 | "auto"1: full-width rows; 2: two equal tracks as asked, whatever the count; "auto": the count decides (3 across, 2×2, rows), never an orphan
variant"cards"
"cards" | "list" | "swatch"cards (the default); list: plain radio rows, a dot then the words; swatch: colour dots named in words
framedfalse
boolean`variant="list"` only: the rows sit in one ruled box, a hairline between them, instead of loose on the page
look"plain"
"plain" | "lift"`variant="list"` only: "plain" (the default) the dot fills and nothing moves; "lift" the chosen option rises towards you on the float shadow, its icon rings once, the rest settle back, and the legend's answer word rolls
Three usesa billing plan to choose · a data region · an import source
Give your coding assistant the Markdown guide instead of screenshots.
https://notchset.dev/api/mcp (setup)v1.1.0 · 2026-11-17
New props: legend, look. Ships glide.ts (SORT_GLIDE), which it now uses. Ships motion.ts (EASE, lessMotion, roleTiming, useLessMotion), which it now uses.
v1.0.0 · 2026-11-09
Released free with the Notchset system.