card
agentmesh/cardFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/card.jsonSource
1import * as React from "react"23import { cn } from "@/registry/base-vega/lib/utils"45function Card({6 className,7 size = "default",8 ...props9}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {10 return (11 <div12 data-slot="card"13 data-size={size}14 className={cn(15 "group/card flex flex-col gap-6 overflow-hidden rounded-xl bg-card py-6 text-sm text-card-foreground shadow-xs ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",16 className17 )}18 {...props}19 />20 )21}2223function CardHeader({ className, ...props }: React.ComponentProps<"div">) {24 return (25 <div26 data-slot="card-header"27 className={cn(28 "group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4",29 className30 )}31 {...props}32 />33 )34}3536function CardTitle({ className, ...props }: React.ComponentProps<"div">) {37 return (38 <div39 data-slot="card-title"40 className={cn(41 "cn-font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",42 className43 )}44 {...props}45 />46 )47}4849function CardDescription({ className, ...props }: React.ComponentProps<"div">) {50 return (51 <div52 data-slot="card-description"53 className={cn("text-sm text-muted-foreground", className)}54 {...props}55 />56 )57}5859function CardAction({ className, ...props }: React.ComponentProps<"div">) {60 return (61 <div62 data-slot="card-action"63 className={cn(64 "col-start-2 row-span-2 row-start-1 self-start justify-self-end",65 className66 )}67 {...props}68 />69 )70}7172function CardContent({ className, ...props }: React.ComponentProps<"div">) {73 return (74 <div75 data-slot="card-content"76 className={cn("px-6 group-data-[size=sm]/card:px-4", className)}77 {...props}78 />79 )80}8182function CardFooter({ className, ...props }: React.ComponentProps<"div">) {83 return (84 <div85 data-slot="card-footer"86 className={cn(87 "flex items-center rounded-b-xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4",88 className89 )}90// … truncated
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
