Tangible Design System · @tangible/ui 0.2.29 · Interactive version · Markdown

Card

import { Card } from '@tangible/ui';

Interactive docs and examples: Card in Storybook.

Card props

Prop Type Default Description
as? "article" | "div" | "section" 'article'
children? React.ReactNode
className? string
disabled? boolean
elevated? boolean Deprecated. Use variant="elevated".
inline? boolean Deprecated. Use mode="inline".
interactive? boolean
mode? "inline" | "stacked" 'stacked' Content arrangement.
onClick? React.MouseEventHandler<HTMLElement> Deprecated. Use Card.Link for interactive cards. onClick without Card.Link has no keyboard/screen-reader semantics.
style? React.CSSProperties
variant? "elevated" | "ghost" | "outline" | "seamless" | "solid" 'solid' Surface treatment.

Also accepts the standard attributes of HTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Card.Head

Prop Type Default Description
children? React.ReactNode
className? string

Also accepts the standard attributes of HTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Card.Body

Prop Type Default Description
children? React.ReactNode
className? string

Also accepts the standard attributes of HTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Card.Foot

Prop Type Default Description
children? React.ReactNode
className? string

Also accepts the standard attributes of HTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Card.Media

Prop Type Default Description
alt string Alt text — pass "" for decorative media.
flush? boolean true Full-bleed media (negative-margin, square outer corners).

Also accepts the standard attributes of ImgHTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Card.Link

Takes the standard attributes of AnchorHTMLAttributes (data-*, aria-*, event handlers), passed to the element it renders.

Examples

Other stories: Basic, Inline, With Stretched Link, Elevated, Disabled, Inline + Elevated (interactive page).

Component API tokens

Read via fallback, never declared. Set one on an ancestor to restyle every instance under it.