BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/ui/card

card

draco-china-github/card
FreeComponent

shadcn/ui publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/card.json

Source

registry/radix-sera/ui/card.tsxraw.githubusercontent.com/draco-china/shadcn-pro/main/apps/docs/public/r/styles/radix-sera/card.json
1import * as React from "react"
2
3import { cn } from "@/registry/radix-sera/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-8 overflow-hidden bg-card py-8 text-sm text-card-foreground shadow-sm ring-1 ring-foreground/5 has-[>img:first-child]:pt-0 data-[size=sm]:gap-5 data-[size=sm]:py-5 *:[img:first-child]:rounded-none *:[img:last-child]:rounded-none",
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.5 rounded-none px-8 group-data-[size=sm]/card:px-5 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-8 group-data-[size=sm]/card:[.border-b]:pb-5",
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(
41 "cn-font-heading text-lg font-semibold tracking-wider uppercase",
42 className
43 )}
44 {...props}
45 />
46 )
47}
48
49function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
50 return (
51 <div
52 data-slot="card-description"
53 className={cn("text-sm leading-relaxed text-muted-foreground", className)}
54 {...props}
55 />
56 )
57}
58
59function CardAction({ className, ...props }: React.ComponentProps<"div">) {
60 return (
61 <div
62 data-slot="card-action"
63 className={cn(
64 "col-start-2 row-span-2 row-start-1 self-start justify-self-end",
65 className
66 )}
67 {...props}
68 />
69 )
70}
71
72function CardContent({ className, ...props }: React.ComponentProps<"div">) {
73 return (
74 <div
75 data-slot="card-content"
76 className={cn("px-8 group-data-[size=sm]/card:px-5", className)}
77 {...props}
78 />
79 )
80}
81
82function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
83 return (
84 <div
85 data-slot="card-footer"
86 className={cn(
87 "flex items-center px-8 group-data-[size=sm]/card:px-5 [.border-t]:pt-8 group-data-[size=sm]/card:[.border-t]:pt-5",
88 className
89 )}
90 {...props}
91 />
92 )
93}
94
95// … truncated

Files it writes

  • registry/radix-sera/ui/card.tsx

Facts

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

Go to the source

draco-china.github.io draco-china/shadcn-pro on GitHub Raw registry item This item as JSON

More from shadcn/ui

All 201 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcn/uiComponentsFreeno deps
alertalertshadcn/uiComponentsFreeno deps
alert-dialogalert-dialogshadcn/uiComponentsFreeno deps
aspect-ratioaspect-ratioshadcn/uiComponentsFreeno deps
avataravatarshadcn/uiComponentsFreeno deps
badgebadgeshadcn/uiComponentsFreeno deps
breadcrumbbreadcrumbshadcn/uiComponentsFreeno deps
buttonbuttonshadcn/uiComponentsFreeno 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