Skip to content
Playground

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

TSX
import { SelectableCard } from "@zentara-co/zenos-ui";

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.

TSX
<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.

Living room with plants and a rust-colored chairBest seller

Interior kit

48 rooms, 6 moods, every one editable.

Mountain retreat

Media can close the card too.

Sunlit mountain valley above a green cliff

Selected: Interior kit

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.

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.

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

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.

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

PropTypeDefaultDescription
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-*.

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.