Card
glasswave/cardFreeComponent
Container for displaying structured information.
Live preview
live · rendered by the registry
Rendered by glasswave on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://glasswave.denizisik.com/r/card.jsonSource
1import { forwardRef, type HTMLAttributes } from "react";2import { cn } from "@/lib/utils";3import { glass } from "@/lib/glass";45const Card = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(6 ({ className, ...props }, ref) => (7 <div ref={ref} className={cn(glass, "shadow-sm", className)} {...props} />8 ),9);10Card.displayName = "Card";1112const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(13 ({ className, ...props }, ref) => (14 <div15 ref={ref}16 className={cn("flex flex-col gap-1.5 p-6", className)}17 {...props}18 />19 ),20);21CardHeader.displayName = "CardHeader";2223const CardTitle = forwardRef<24 HTMLParagraphElement,25 HTMLAttributes<HTMLHeadingElement>26>(({ className, ...props }, ref) => (27 <h328 ref={ref}29 className={cn(30 "!m-0 text-xl font-semibold leading-none tracking-tight",31 className,32 )}33 {...props}34 />35));36CardTitle.displayName = "CardTitle";3738const CardDescription = forwardRef<39 HTMLParagraphElement,40 HTMLAttributes<HTMLParagraphElement>41>(({ className, ...props }, ref) => (42 <p43 ref={ref}44 className={cn("!m-0 text-sm opacity-70", className)}45 {...props}46 />47));48CardDescription.displayName = "CardDescription";4950const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(51 ({ className, ...props }, ref) => (52 <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />53 ),54);55CardContent.displayName = "CardContent";5657const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(58 ({ className, ...props }, ref) => (59 <div60 ref={ref}61 className={cn("flex items-center p-6 pt-0", className)}62 {...props}63 />64 ),65);66CardFooter.displayName = "CardFooter";6768export {69 Card,70 CardHeader,71 CardFooter,72 CardTitle,73 CardDescription,74 CardContent,75};
What it pulls in
Other registry items
Files it writes
More from glasswave
All 60 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | glasswave | Components | Free | 2 deps | |
| Alertalert | glasswave | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | glasswave | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | glasswave | Components | Free | 1 dep | |
| Avataravatar | glasswave | Components | Free | 1 dep | |
| Badgebadge | glasswave | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | glasswave | Components | Free | 2 deps | |
| Buttonbutton | glasswave | Components | Free | 2 deps |
