Skip to content

Card

A versatile container component with glassmorphism support, perfect for grouping related content.

Import

tsx
import { ZCard } from "@zurto/ui";

Basic Usage

ZCard

Card Title

Card content goes here.

Variants

Default

ZCard

Default card with solid background

Glass

ZCard

Glassmorphism effect with blur backdrop

Elevated

ZCard

Elevated card with shadow

Interactive Cards

ZCard

Clickable Card

Hover and click me

ZCardZCardHeaderZCardTitleZCardSubtitleZCardBodyZCardFooterZButton

Settings

Manage your preferences

Configure your account settings here.

Card Grid

ZCard

Card 1

Card 2

Card 3

Card with Image

ZCardZCardBodyZCardTitle

Featured Article

Brief description of the article.

Props

PropTypeDefaultDescription
variant'default' | 'glass' | 'bordered' | 'elevated''default'Visual style of the card
padding'none' | 'sm' | 'md' | 'lg''md'Internal padding size
interactivebooleanfalseEnable hover and click effects
onClick() => voidClick handler (makes card interactive)
asElementType'div'Render as different element
childrenRequiredReactNodeCard content

Compound Components

ComponentDescription
ZCardMain container
ZCardHeaderHeader section with title and subtitle
ZCardTitleTitle element
ZCardSubtitleSubtitle/description element
ZCardBodyMain content area
ZCardFooterFooter with actions

Accessibility

  • Uses semantic HTML structure
  • Interactive cards are keyboard focusable
  • role="button" applied when clickable
  • Supports aria-label for screen readers

Keyboard Support

KeyAction
TabMove focus to interactive card
Enter / SpaceActivate interactive card

Released under the MIT License.