BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/uifoundry/card

Card

uifoundry/card
FreeComponent

Card component with header, content, footer, title, description, and action slots

Live preview

live · rendered by the registry
Rendered by uifoundry on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://uifoundry.dev/r/card.json

Source

registry/ui/card.tsxuifoundry.dev/r/card.json
1import * as React from "react";
2
3import { cn } from "@/registry/default/utils";
4
5function Card({ className, ...props }: React.ComponentProps<"div">) {
6 return (
7 <div
8 className={cn(
9 "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
10 className,
11 )}
12 data-slot="card"
13 {...props}
14 />
15 );
16}
17
18function CardAction({ className, ...props }: React.ComponentProps<"div">) {
19 return (
20 <div
21 className={cn(
22 "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
23 className,
24 )}
25 data-slot="card-action"
26 {...props}
27 />
28 );
29}
30
31function CardContent({ className, ...props }: React.ComponentProps<"div">) {
32 return (
33 <div
34 className={cn("px-6", className)}
35 data-slot="card-content"
36 {...props}
37 />
38 );
39}
40
41function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
42 return (
43 <div
44 className={cn("text-muted-foreground text-sm", className)}
45 data-slot="card-description"
46 {...props}
47 />
48 );
49}
50
51function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
52 return (
53 <div
54 className={cn("flex items-center px-6 [.border-t]:pt-6", className)}
55 data-slot="card-footer"
56 {...props}
57 />
58 );
59}
60
61function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
62 return (
63 <div
64 className={cn(
65 "@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",
66 className,
67 )}
68 data-slot="card-header"
69 {...props}
70 />
71 );
72}
73
74function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
75 return (
76 <div
77 className={cn("leading-none font-semibold", className)}
78 data-slot="card-title"
79 {...props}
80 />
81 );
82}
83
84export {
85 Card,
86 CardAction,
87 CardContent,
88 CardDescription,
89 CardFooter,
90 CardHeader,
91 CardTitle,
92};

What it pulls in

npm packages

  • react

Other registry items

  • @uifoundry/style-utils

Files it writes

  • registry/ui/card.tsx

Facts

Registry
uifoundry
Type
registry:ui
Access
Free
Files written
1
Licence
NOASSERTION
First indexed
2026-08-01
Last confirmed
2 days ago

Go to the source

Docs on uifoundry uifoundry.dev UIFoundry/uifoundry on GitHub Raw registry item This item as JSON

More from uifoundry

All 54 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Groupanimated-groupuifoundryComponentsFree2 deps
ButtonbuttonuifoundryComponentsFree3 deps
Call To Action Pair Fieldcall-to-action-pair-fielduifoundryComponentsFree3 deps
Description Fielddescription-fielduifoundryComponentsFree2 deps
Flickering Gridflickering-griduifoundryComponentsFree1 dep
Header Fieldheader-fielduifoundryComponentsFree2 deps
Icon ComponenticonuifoundryComponentsFree2 deps
Render BlocksrenderblocksuifoundryComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex