docs/components/display/Card

Card

Content card with padding, radius, and shadow.

import { Card } from '@ybouhjira/hyperkit';

#Playground

Edit the code — the preview recompiles and re-renders as you type.

Live playground
Loading preview…

#Props

PropTypeDefaultDescription
variant'default' | 'outlined' | 'elevated''default'Visual style variant. Affects border, shadow, and background.
padding'none' | 'sm' | 'md' | 'lg''md'Padding size for card content.
onClick() => voidClick event handler. Makes card clickable with cursor pointer.
hoverablebooleanfalseEnable hover effect without click handler.
livebooleanfalseWhen true, the card visually breathes + carries an animated accent border to signal "this represents a live, running thing" (per premium-ui Law #11). Auto-wraps the rendered card in a LivePulse.
children *JSX.ElementCard content.
unstyledbooleanfalseRemove all default styles, only apply classNames.
classNames{ /** Class for root card element. */ root?: string; }Custom class names for card root.
classstringAdditional CSS class for root element.
styleJSX.CSSPropertiesInline styles for root element.

* required prop.

#Design Tokens

This component reads the following CSS custom properties. Override them globally or per-instance to restyle it — see the CSS Variables guide.

  • --sk-accent
  • --sk-accent-muted
  • --sk-bg-elevated
  • --sk-bg-secondary
  • --sk-bg-tertiary
  • --sk-border
  • --sk-border-subtle
  • --sk-card-bg
  • --sk-card-bg-elevated
  • --sk-card-bg-outlined
  • --sk-card-border-color
  • --sk-card-border-color-outlined
  • --sk-card-hover-bg
  • --sk-card-hover-bg-outlined
  • --sk-card-hover-border-color
  • --sk-card-hover-border-color-outlined
  • --sk-card-padding-lg
  • --sk-card-padding-md
  • --sk-card-padding-none
  • --sk-card-padding-sm
  • --sk-card-radius
  • --sk-card-shadow-elevated
  • --sk-font-size-lg
  • --sk-font-size-sm
  • --sk-radius-lg
  • --sk-space-sm
  • --sk-space-xs
  • --sk-text-primary
  • --sk-text-secondary