EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
Card·component·@astryxdesign/core

Clickable Card

An interactive card for navigation or action targets. Nested interactive elements work independently.

Open in Playground @astryxdesign/core/ClickableCard

Showcases and examples

3 documented examples

Clickable Card

A clickable card that navigates on click. Nested interactive elements work independently.

Preview loads on approachPreview loads on approach
Exact source · clickable-card-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {ClickableCard} from '@astryxdesign/core/ClickableCard';
import {Stack} from '@astryxdesign/core/Layout';
import {Text, Heading} from '@astryxdesign/core/Text';

export default function ClickableCardShowcase() {
  return (
    <ClickableCard label="Settings" href="#" width={320}>
      <Stack direction="vertical" gap={2}>
        <Heading level={4}>Settings</Heading>
        <Text type="body" color="secondary">
          Click anywhere on this card to navigate. Nested buttons and links work
          independently.
        </Text>
      </Stack>
    </ClickableCard>
  );
}

Usage

An interactive card for navigation or action targets. Nested interactive elements work independently.

  • Use for cards that navigate to a detail page or trigger a single action.
  • Nest buttons or links freely inside; they handle their own events.
  • Use for toggling selection; use SelectableCard for that.

Typed props

PropType and behavior
labelstring · required
Accessibility label.
onClick(event: MouseEvent) => void
Click handler: fires on card surface only.
hrefstring
Navigation URL. Plain, new-tab, Cmd/Ctrl-click, and middle-click activation all follow the shared navigation rule described on the Link href prop.
targetstring · default '_self'
Link target.
isDisabledboolean · default false
Disables the card.
childrenReactNode
Card content.
padding0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 · default 4
Inner padding.
variant'default' | 'transparent' | 'muted' | 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow' · default 'default'
Background color variant.
elevation'none' | 'low' | 'med' | 'high' · default 'none'
Resting shadow depth. Often raised to signal the whole card is clickable.
widthSizeValue
Card width.
heightSizeValue
Card height.
maxWidthSizeValue
Maximum card width.
xstyleStyleXStyles
StyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value, not an inline style object like style={{}}.

Anatomy

Container · required

Interactive div with hover/focus/active states.

Content · required

Children, which may include nested interactive elements.

Theming

Container theming is enabled.

Targets

astryx-clickable-card

Visual props: variant