Skip to main content

Card

Content container with optional media slot and interactive mode.

Preview
Loading preview…

Import

// Web Component
import '@kittl/ui';

// React
import { Card } from '@kittl/ui-react';

Usage

Web Component

<kittl-card bordered>
<img slot="media" src="https://example.com/thumb.jpg" alt="Preview" />
Card content goes here.
</kittl-card>

<kittl-card interactive>
Click this card
</kittl-card>

React

<Card bordered>
<img slot="media" src="https://example.com/thumb.jpg" alt="Preview" />
Card content goes here.
</Card>

<Card interactive onCardClick={() => console.log('clicked')}>
Click this card
</Card>

Props

PropertyTypeDefaultDescription
borderedbooleanfalseShow border
interactivebooleanfalseEnable click behavior
activebooleanfalseActive/selected state
disabledbooleanfalseDisable interaction

Slots

SlotDescription
mediaTop media area (image, video, etc.)
(default)Card body content

Events

EventDetailDescription
card-clickFired when an interactive card is clicked

React prop: onCardClick

Accessibility

  • When interactive, the card gets role="button" and tabindex="0"
  • Keyboard: Enter triggers click