Skip to content

RadioCard

Radio buttons styled as a cards to select one option from several options.

Selected:null
import { RadioCard } from '@fintech-sandpit/ui/react';
return (
<RadioCard.Root defaultValue="aws">
<RadioCard.Item
value="aws"
className="min-h-36 flex-1 flex flex-col"
>
<div className="flex items-center justify-between">
<p className="text-xl font-semibold">AWS</p>
<RadioCard.ItemControl />
</div>
<p className="text-sm text-justify hyphens-auto mt-4">
<strong>Amazon Web Services </strong>
is known for its extensive global infrastructure, scalability,
and flexibility, catering to a wide range of organizations
from startups to large enterprises
</p>
</RadioCard.Item>
<RadioCard.Item
value="azure"
className="min-h-36 flex-1 flex flex-col"
>
<div className="flex items-center justify-between">
<p className="text-xl font-semibold">Azure</p>
<RadioCard.ItemControl />
</div>
<p className="text-sm text-justify hyphens-auto mt-4">
<strong>Azure </strong>
offers a broad range of services comparable to AWS,
with a particular strength in hybrid cloud solutions
and enterprise-focused features
</p>
</RadioCard.Item>
<RadioCard.Item
value="gcp"
className="min-h-36 flex-1 flex flex-col"
>
<div className="flex items-center justify-between">
<p className="text-xl font-semibold">GCP</p>
<RadioCard.ItemControl />
</div>
<p className="text-sm text-justify hyphens-auto mt-4">
<strong>Google Cloud Platform </strong>
leverages Google's expertise in data analytics, machine learning,
and artificial intelligence providing services like BigQuery,
Vertex AI, and Kubernetes
</p>
</RadioCard.Item>
<RadioCard.Item
value="oracle"
className="min-h-36 flex-1 flex flex-col"
disabled
>
<div className="flex items-center justify-between">
<p className="text-xl font-semibold">Oracle</p>
<RadioCard.ItemControl />
</div>
<p className="text-sm text-justify hyphens-auto mt-4">
<strong>Oracle</strong>
's cloud platform, designed with a focus on enterprise workloads
and strong performance for Oracle databases and applications
</p>
<p className="text-xs font-medium mt-2 text-right">
<span className="bg-amber-500 dark:bg-amber-800 text-white px-1 py-0.5 rounded-sm">Coming soon</span>
</p>
</RadioCard.Item>
</RadioCard.Root>
);
NameTypeDefaultDescription
valuestringThe value of the radio card field (controlled)
defaultValuestringThe default value of the radio card field (uncontrolled)
sizeSizemdThe size of the radio card field
variantRadioVariantsolidThe variant of the radio card field
orientationOrientationverticalThe orientation of the radio card field
colorSchemeColorSchemeneutralThe color scheme of the radio card field
disabledbooleanfalseWhether the radio card field is disabled
readOnlybooleanfalseWhether the radio card field is read only
NameTypeDefaultDescription
valuestringThe value of the radio card item
disabledbooleanfalseWhether the radio card item is disabled
NameTypeDescription
onChange(value: string) => voidCallback fired when the value changes
type ColorScheme = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'
type Orientation = 'vertical' | 'horizontal'
type RadioVariant = 'solid' | 'outline' | 'ghost'
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl'