BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/formscn/card

card

formscn/card
FreeComponent

Card component

Install it

npx shadcn@latest add https://formscn.space/r/card.json

Source

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

Files it writes

  • src/components/ui/card.tsx

Facts

Registry
formscn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

formscn.space AbdullahMukadam/formscn on GitHub Raw registry item This item as JSON

More from formscn

All 30 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
buttonbuttonformscnComponentsFree2 deps
calendarcalendarformscnComponentsFree2 deps
checkboxcheckboxformscnComponentsFree1 dep
fieldfieldformscnComponentsFreeno deps
inputinputformscnComponentsFree1 dep
labellabelformscnComponentsFree2 deps
phone-inputphone-inputformscnComponentsFree2 deps
popoverpopoverformscnComponentsFree1 dep
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