Display and feedback · stable · MIT

Card

Passive, link, and button surfaces held in one continuous gel-pocket frame.

Install editable source

Add Card

Base UI / canonicalnpx shadcn@latest add https://gummyui.dev/r/gummy-card.json

No package dependency beyond React. Shared Gummy material is resolved automatically.

Behavior contract

Semantics before surface

Semantics

Separate article, anchor, and button roots prevent false interactivity.

Keyboard

Native link or button behavior on interactive roots.

System support

Light and dark themes, logical RTL layout, reduced motion, responsive content, and forwarded public refs.

Source-derived reference

Anatomy and public API

Exported anatomy

These public React parts are read directly from the canonical source during the documentation build.

  • GummyCard
  • GummyCardButton
  • GummyCardContent
  • GummyCardDescription
  • GummyCardFooter
  • GummyCardHeader
  • GummyCardIcon
  • GummyCardLink
  • GummyCardTitle

Prop contracts

GummyCardButtonProps

Composes React.ButtonHTMLAttributes<HTMLButtonElement> & CardVisualProps

GummyCardLinkProps

Composes React.AnchorHTMLAttributes<HTMLAnchorElement> & CardVisualProps

GummyCardProps

Composes Omit<React.HTMLAttributes<HTMLElement>, "onClick" | "onKeyDown" | "onKeyUp" | "tabIndex" | "role"> & CardVisualProps

GummyCardTitleProps

Composes React.HTMLAttributes<HTMLHeadingElement> & { level?: 2 | 3 | 4 | 5 | 6; }

Troubleshooting

Check behavior before surface.

Implementation decisions

When to use Card

Use a card to group content that belongs together, not to make every region look interactive. If the whole surface navigates, keep one clear link target and avoid nesting other controls inside it; otherwise expose each action normally. Maintain a logical heading level and reading order when cards reflow. Test missing media, long titles, mixed action counts, keyboard focus, narrow columns, forced colours, and whether the grouped information still makes sense without the visual boundary.

Live product source

Inspect the canonical states

The Component Lab exercises real source across default, focus, disabled, responsive, dark, reduced-motion, and RTL contexts.

Open the live Component Lab

Interactive inspection

Try Card in context

Load the real component preview when you are ready to interact with its responsive, theme, and direction controls.

Editable source

Read before you install

Canonical Base UI or native source

The registry payload stays off the initial page request.