BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/blode/ui/card

Card

blode-ui/card
FreeComponent

A container for grouping related content and actions.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/mblode/blode-ui/main/public/r/card.json

Source

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

Files it writes

  • registry/default/ui/card.tsx

Facts

Registry
blode/ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-01
Last confirmed
today

Go to the source

blode.co mblode/blode-ui on GitHub Raw registry item This item as JSON

More from blode/ui

All 85 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionblode/uiComponentsFree2 deps
Alertalertblode/uiComponentsFreeno deps
Alert Dialogalert-dialogblode/uiComponentsFree1 dep
Ask User Questionsask-user-questionsblode/uiComponentsFree1 dep
Aspect Ratioaspect-ratioblode/uiComponentsFree1 dep
Attachmentattachmentblode/uiComponentsFree1 dep
Autocompleteautocompleteblode/uiComponentsFree1 dep
Avataravatarblode/uiComponentsFree1 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