About
A larger, more descriptive selectable card group (single or multiple selection) built on React Aria GridList, with room for a label and supporting description on each option.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Choice Box to your project and fits it to your theme.
Code
How Choice Box is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import {
ChoiceBox,
ChoiceBoxDescription,
ChoiceBoxItem,
ChoiceBoxLabel,
} from "@/components/ui/choice-box";
export default function ChoiceBoxDemo() {
return (
<div className="mx-auto w-full max-w-md p-4">
<ChoiceBox
aria-label="Select a plan"
selectionMode="single"
defaultSelectedKeys={["premium"]}
>
<ChoiceBoxItem id="premium" textValue="Premium">
<ChoiceBoxLabel>Premium</ChoiceBoxLabel>
<ChoiceBoxDescription>
Advanced options for growing needs.
</ChoiceBoxDescription>
</ChoiceBoxItem>
<ChoiceBoxItem id="deluxe" textValue="Deluxe">
<ChoiceBoxLabel>Deluxe</ChoiceBoxLabel>
<ChoiceBoxDescription>
Top-tier features for maximum performance.
</ChoiceBoxDescription>
</ChoiceBoxItem>
<ChoiceBoxItem id="ultimate" textValue="Ultimate">
<ChoiceBoxLabel>Ultimate</ChoiceBoxLabel>
<ChoiceBoxDescription>
All-inclusive plan with every feature available.
</ChoiceBoxDescription>
</ChoiceBoxItem>
<ChoiceBoxItem id="enterprise" textValue="Enterprise">
<ChoiceBoxLabel>Enterprise</ChoiceBoxLabel>
<ChoiceBoxDescription>
Customized solutions for large organizations.
</ChoiceBoxDescription>
</ChoiceBoxItem>
</ChoiceBox>
</div>
);
}
















