Inputs and selection
Selectable card
card as a radio/checkbox choice
function SelectableCardDemo() { const [plan, setPlan] = React.useState("standard"); const [extras, setExtras] = React.useState<string[]>(["insurance"]); const toggle = (v: string) => setExtras((s) => (s.includes(v) ? s.filter((x) => x !== v) : [...s, v])); return ( <View className="w-full gap-5"> <View className="gap-2"> <Text className="text-muted-foreground text-xs font-semibold uppercase tracking-wide">Single select</Text> <SelectableCard icon={TruckIcon} title="Standard delivery" description="3–5 business days" detail="Free" selected={plan === "standard"} onPress={() => setPlan("standard")} /> <SelectableCard icon={ZapIcon} title="Express delivery" description="Tomorrow before noon" detail="$9.90" selected={plan === "express"} onPress={() => setPlan("express")} /> </View> {/* Never mix the two in one group. */} <View className="gap-2"> <Text className="text-muted-foreground text-xs font-semibold uppercase tracking-wide">Multi select</Text> <SelectableCard mode="checkbox" title="Add insurance" description="Covers loss and damage" detail="$2.00" selected={extras.includes("insurance")} onPress={() => toggle("insurance")} /> <SelectableCard mode="checkbox" title="Signature on delivery" description="Someone must sign for it" detail="$1.50" selected={extras.includes("signature")} onPress={() => toggle("signature")} /> </View> </View> );}Usage
A whole card as a choice. Selection shows as a ring/check plus a tinted border, not colour alone.
API
<SelectableCard title description? icon? detail? selected onPress mode="radio|checkbox" />Get it
Already in every copy of the native kit:
import { SelectableCard } from '@/components/kit/selectable-card';Details
- Exports
SelectableCard- Packages
- lucide-react-native@^1.21.0
- Installs with
- @halftone-native/icon, @halftone-native/lib-haptics, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- radio card, option card, plan, choice
- Registry JSON
- /r/native/selectable-card.json
function SelectableDemo() { const [plan, setPlan] = React.useState('team'); return ( <div role="radiogroup" aria-label="Plan" className="flex w-full max-w-md flex-col gap-3"> <SelectableCard title="Starter" description="5 invoices a month" detail="£0" icon={WalletIcon} selected={plan === 'starter'} onClick={() => setPlan('starter')} /> <SelectableCard title="Team" description="Unlimited invoices, reminders" detail="£24" icon={RepeatIcon} selected={plan === 'team'} onClick={() => setPlan('team')} /> </div> );}Usage
A whole card as a choice. Selection shows as a ring/check plus a tinted border, not colour alone.
API
<SelectableCard title description? icon? detail? selected onClick mode="radio|checkbox" />Get it
Already in every copy of the web kit:
import { SelectableCard } from '@/components/kit/selectable-card';Details
- Exports
SelectableCard- Packages
- cn@^0.5.2, lucide-react@^1.52.0
- Also searched as
- option card, plan picker
- Registry JSON
- /r/web/selectable-card.json
Agents: the whole registry is at /llms.txt.