YuhuanStudioYunUIDocs
Data Display

Card

Surface container rendering the canonical .card style.

A surface container rendering the canonical .card style — the same look as raw className="card" usages, consolidated into one component. Pass hover for an interactive lift.

Import

tsx
1import { Card } from "@yuhuanowo/yunui";

Basic

Card

Pro plan

Everything in Basic, plus higher limits.

Hover

hover adds a border + shadow transition for clickable cards.

Hover lift

Pro planActive

Hover me — the border and shadow animate.

Composing

Card is an unopinionated container — compose any content inside, including other primitives.

With action

Upgrade your plan

Unlock higher rate limits and priority support.

Parts

Card is usable on its own, but it also ships the five slots below — reach for them when several cards must line their titles and actions up with each other, rather than each one inventing its own padding.

PartRole
CardThe surface itself (border, radius, background, optional hover).
CardHeaderHeader region, p-6, stacks its children with space-y-1.5.
CardTitleThe heading — renders a real <h3>, so the page keeps a document outline.
CardDescriptionMuted supporting line under the title.
CardContentBody region; p-6 pt-0, so it sits flush under the header.
CardFooterActions/meta row; p-6 pt-0, flex with centered items.

Every part forwards its ref and all standard <div> (or <h3>/<p>) props.

Parts

Monthly usage

Resets on the 1st.

2,481,930

tokens of 5,000,000

Props

PropTypeDefaultDescription
hoverbooleanAdd a hover lift (border + shadow transition).

Card also forwards every standard <div> prop (className, onClick, style, …).

On this page