BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/amarjay-ui/card

card

amarjay-ui/card
FreeComponent

Container for grouping related content and actions.

Live preview

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

Install it

npx shadcn@latest add https://ui.amarjay.com/r/card.json

Source

src/components/ui/card.tsxui.amarjay.com/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 "group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg",
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 "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
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("font-heading text-sm font-medium", 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-xs/relaxed text-muted-foreground", 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(
61 "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
62 className
63 )}
64 {...props}
65 />
66 )
67}
68
69function CardContent({ className, ...props }: React.ComponentProps<"div">) {
70 return (
71 <div
72 data-slot="card-content"
73 className={cn("px-(--card-spacing)", className)}
74 {...props}
75 />
76 )
77}
78
79function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
80 return (
81 <div
82 data-slot="card-footer"
83 className={cn(
84 "flex items-center rounded-b-lg px-(--card-spacing) [.border-t]:pt-(--card-spacing)",
85 className
86 )}
87 {...props}
88 />
89 )
90}
91
92export {
93 Card,
94 CardHeader,
95 CardFooter,
96 CardTitle,
97 CardAction,
98 CardDescription,
99// … truncated

What it pulls in

Other registry items

  • utils

Files it writes

  • src/components/ui/card.tsx

Facts

Registry
amarjay-ui
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-10
Last confirmed
today

Go to the source

Docs on amarjay-ui ui.amarjay.com amar-jay/ui on GitHub Raw registry item This item as JSON

More from amarjay-ui

All 18 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
alertalertamarjay-uiComponentsFree1 dep
avataravataramarjay-uiComponentsFree1 dep
badgebadgeamarjay-uiComponentsFree2 deps
buttonbuttonamarjay-uiComponentsFree2 deps
chartchartamarjay-uiComponentsFree1 dep
context-menucontext-menuamarjay-uiComponentsFree2 deps
dialogdialogamarjay-uiComponentsFree2 deps
dropdown-menudropdown-menuamarjay-uiComponentsFree2 deps
BlockDex

Built by

Kynth Studios

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 Studios

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 Studios

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