Card
gr8monk3ys/cardFreeComponent
Flat editorial card with hover lift.
Install it
npx shadcn@latest add https://ui.lscaturchio.xyz/r/card.jsonSource
1import * as React from "react"23import { cn } from "@/lib/utils"45const Card = React.forwardRef<6 HTMLDivElement,7 React.HTMLAttributes<HTMLDivElement>8>(({ className, ...props }, ref) => (9 <div10 ref={ref}11 className={cn(12 "rounded-2xl bg-background text-card-foreground surface-card",13 className,14 )}15 {...props}16 />17))18Card.displayName = "Card"1920const CardHeader = React.forwardRef<21 HTMLDivElement,22 React.HTMLAttributes<HTMLDivElement>23>(({ className, ...props }, ref) => (24 <div25 ref={ref}26 className={cn("flex flex-col space-y-1.5 p-6", className)}27 {...props}28 />29))30CardHeader.displayName = "CardHeader"3132const CardTitle = React.forwardRef<33 HTMLHeadingElement,34 React.HTMLAttributes<HTMLHeadingElement>35>(({ className, children, ...props }, ref) => (36 <h337 ref={ref}38 className={cn(39 "text-2xl font-semibold leading-none tracking-tight",40 className,41 )}42 {...props}43 >44 {children}45 </h3>46))47CardTitle.displayName = "CardTitle"4849const CardDescription = React.forwardRef<50 HTMLParagraphElement,51 React.HTMLAttributes<HTMLParagraphElement>52>(({ className, ...props }, ref) => (53 <p54 ref={ref}55 className={cn("text-sm text-muted-foreground", className)}56 {...props}57 />58))59CardDescription.displayName = "CardDescription"6061const CardContent = React.forwardRef<62 HTMLDivElement,63 React.HTMLAttributes<HTMLDivElement>64>(({ className, ...props }, ref) => (65 <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />66))67CardContent.displayName = "CardContent"6869const CardFooter = React.forwardRef<70 HTMLDivElement,71 React.HTMLAttributes<HTMLDivElement>72>(({ className, ...props }, ref) => (73 <div74 ref={ref}75 className={cn("flex items-center p-6 pt-0", className)}76 {...props}77 />78))79CardFooter.displayName = "CardFooter"8081export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
What it pulls in
Other registry items
Files it writes
More from gr8monk3ys
All 69 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | gr8monk3ys | Components | Free | 2 deps | |
| ActiveNavLinkactive-nav-link | gr8monk3ys | Components | Free | no deps · 2 files | |
| alertalert | gr8monk3ys | Components | Free | 1 dep | |
| alert-dialogalert-dialog | gr8monk3ys | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | gr8monk3ys | Components | Free | 1 dep | |
| attachmentattachment | gr8monk3ys | Components | Free | 2 deps | |
| Avataravatar | gr8monk3ys | Components | Free | 1 dep | |
| Badgebadge | gr8monk3ys | Components | Free | 1 dep |
