Selectable Card
A form-compatible card with controlled or uncontrolled selection.
A form-compatible card with controlled or uncontrolled selection.
Analytics
Include product usage metrics.
Audit log
Record member and policy activity.
Reports
Include scheduled reports.
Archive
Requires an Enterprise plan.
Selected: analytics
Import
Section titled “Import”import { SelectableCard } from "@zentara-co/zenos-ui";Anatomy
Section titled “Anatomy”SelectableCard reuses the Card compound parts, including SelectableCard.Media. A native checkbox or radio input (visually hidden) owns selection state. Clicking the card toggles the input unless the target is another interactive control.
<SelectableCard label="Analytics" name="features" value="analytics"> <SelectableCard.Media>{/* photo or video */}</SelectableCard.Media> <SelectableCard.Header> <SelectableCard.Title>Analytics</SelectableCard.Title> <SelectableCard.Description>Include usage metrics.</SelectableCard.Description> </SelectableCard.Header></SelectableCard>SelectableCard.Media uses the same inset frame as Card.Media. The hidden checkbox or radio still owns selection, and the selected border wraps the card around the frame. Leave other controls out of the frame so a click on the picture selects the card.
Interior kit
48 rooms, 6 moods, every one editable.
Mountain retreat
Media can close the card too.
Selected: Interior kit
Checkbox selection
Section titled “Checkbox selection”Use the default selectionType="checkbox" for multiple independent choices. Control selection with checked and onCheckedChange, or use defaultChecked for uncontrolled usage. The preview at the top of this page shows multi-select with a disabled card.
Variants
Section titled “Variants”variant="default", variant="grey", and variant="white" match Card. White cards use a white surface in light mode and the default card background in dark mode. Hover and press fills follow the variant. Selected cards use the semantic border-border-selected token; disabled cards retain their muted treatment.
Disabled cards match ClickableCard: muted surface, opacity-50, and muted text on title and description.
Radio selection
Section titled “Radio selection”Use selectionType="radio" with a shared name for mutually exclusive choices. Control checked when the selected option belongs to application state.
Monthly
Flexible monthly billing.
Annual
Save with yearly billing.
Billing cycle: monthly
Custom styling
Section titled “Custom styling”Pass className on the root for custom surfaces and hover fills. The selected state sets data-selected on the root—combine it with utilities such as data-[selected]:border-border-selected when you override the default border color but still want the selected treatment.
Tint title and description on the compound parts when using accent backgrounds. Selection, focus, and form submission behavior are unchanged.
Pro plan
Selected cards still use the design system selected border.
SelectableCard or another component
Section titled “SelectableCard or another component”Use SelectableCard inside forms when a choice should look like a card. Use ClickableCard for a single action without selection state. Use Card for static content.
SelectableCard.Root SelectableCard.Header SelectableCard.Title SelectableCard.Description SelectableCard.Action SelectableCard.Content SelectableCard.Media SelectableCard.Footer
API
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Accessible name for the hidden checkbox or radio input. |
checked | boolean | — | Controlled selected state. |
defaultChecked | boolean | false | Initial uncontrolled state. |
onCheckedChange | (checked: boolean) => void | — | Runs after selection changes. |
name / value | string | — | Hidden form input metadata. |
selectionType | checkbox | radio | checkbox | Hidden input type. |
disabled | boolean | false | Prevents selection and applies muted, reduced-opacity styling. |
variant | default | grey | white | default | Card surface; hover fills match the chosen variant. |
className | string | — | Merged last on the root. Custom surfaces and data-[selected] border utilities compose with selection state. |
native props | React.HTMLAttributes<HTMLDivElement> | — | Forwards native attributes, events, aria-*, data-*, className, style, and ref. |
Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props,
including className, style, aria-*, and data-*.
Accessibility
Section titled “Accessibility”SelectableCard uses a native checkbox or radio input, so it participates in keyboard navigation and form submission. Give every card a concise label, group radio cards with an accessible group name, and use disabled when a choice is unavailable.