Layout / Card

Card

Group related content and actions in one framed region.

Customize

Props · 6

PropDefaultDescription
recipe"surface" | "surface-raised" | "surface-soft" | "artifact-cut" | "bevel" | "notch-meta" | "receipt" | "file-tab" | "stacked" | "stepped" | "inset""surface"Surface recipe: shape, edge, fill and depth.
size"default" | "sm""default"Inner spacing.
state"ready" | "working" | "success" | "blocked" | "offline" | "idle" | "changed" | "invalid" | "disabled"—Status shown as a glyph and label, with its edge.
labelstring—Tab label on the frame.
CardTitle.childrenstring"Review queue"Heading.
CardDescription.childrenstring"Four packets are ready to review."Supporting line under the heading.

Usage

import { Card, CardHeader, CardTitle, CardDescription, CardFooter } from "@/components/ui/card"
import { Button } from "@/components/ui/button"

<Card>
  <CardHeader>
    <CardTitle>Review queue</CardTitle>
    <CardDescription>Four packets are ready to review.</CardDescription>
  </CardHeader>
  <CardFooter>
    <Button size="sm">Inspect</Button>
  </CardFooter>
</Card>

Install

Paste this prompt into your coding agent. It installs through the registry and adds the 1bitcn rules to AGENTS.md.

Install Card from 1bitcn (@1bitcn/card) in this project.

1bitcn is a shadcn registry of 1-bit React components. Every theme has exactly two paints: ink and paper.

1. If the project has no components.json, run `npx shadcn@latest init` first.
2. Add the registry: `npx shadcn@latest registry add @1bitcn=https://1bitcn.com/r/{name}.json`
3. Install: `npx shadcn@latest add @1bitcn/card` (it also brings @1bitcn/base: theme, CSS and the agent skill). If the project uses another package runner (pnpm dlx, yarn dlx, bunx), you may use it instead. Do not copy files by hand.
4. Add this note to AGENTS.md (create the file if needed; skip if it is already there):

   ## 1bitcn
   - UI comes from the 1bitcn shadcn registry (@1bitcn). Catalog: https://1bitcn.com/llms.txt. Full rules: .agents/skills/1bitcn/SKILL.md
   - Each theme has two paints, ink and paper. Middle tones come from the monochrome ramp tokens (--bit-ink-soft, --bit-mid, --bit-paper-deep, --bit-scrim). Add no other colors.
   - Show state with shape, border, pattern or label, not hue. Add items with `shadcn add @1bitcn/<name>`, not by hand.
5. Use it with this configuration. If it is unclear where it belongs, ask before editing:

   ```tsx
   import { Card, CardHeader, CardTitle, CardDescription, CardFooter } from "@/components/ui/card"
   import { Button } from "@/components/ui/button"
   
   <Card>
     <CardHeader>
       <CardTitle>Review queue</CardTitle>
       <CardDescription>Four packets are ready to review.</CardDescription>
     </CardHeader>
     <CardFooter>
       <Button size="sm">Inspect</Button>
     </CardFooter>
   </Card>
   ```
6. Check: the project typechecks and builds, and the component from `@/components/ui/card` renders.

Docs: https://1bitcn.com/docs/components/card.md
Include source

Optional: let your agent browse the registry with npx shadcn@latest mcp init.

States

In use
Recipes
Soft frame
General content and forms.
Raised surface
A distinct content layer.
Quiet surface
Supporting content with a qualified tone.
Cut artifact
An exported asset or document.
Beveled module
A bounded tool or inspector.
Metadata notch
A document with an identifier in its contour.
Receipt
A completed transaction with a footer seam.
File tab
A named document or resource.
Stacked sheets
A collection of related documents.
Stepped corner
A compact technical module.
Inset panel
A nested work area.
Keyboard

Use Tab to reach the component. The base style supplies a visible double focus outline.

Motion engine

Loading motion options…

Source