card
aomi/cardFreeComponent
Displays a card with header, content, and footer.
Install it
npx shadcn@latest add https://aomi.dev/r/card.jsonSource
1import * as React from "react";23import { cn } from "@aomi-labs/react";45const Card = React.forwardRef<6 HTMLDivElement,7 React.HTMLAttributes<HTMLDivElement>8>(({ className, ...props }, ref) => (9 <div10 ref={ref}11 className={cn(12 "bg-card text-card-foreground rounded-lg border shadow-sm",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 HTMLParagraphElement,34 React.HTMLAttributes<HTMLHeadingElement>35>(({ className, ...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));45CardTitle.displayName = "CardTitle";4647const CardDescription = React.forwardRef<48 HTMLParagraphElement,49 React.HTMLAttributes<HTMLParagraphElement>50>(({ className, ...props }, ref) => (51 <p52 ref={ref}53 className={cn("text-muted-foreground text-sm", className)}54 {...props}55 />56));57CardDescription.displayName = "CardDescription";5859const CardContent = React.forwardRef<60 HTMLDivElement,61 React.HTMLAttributes<HTMLDivElement>62>(({ className, ...props }, ref) => (63 <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />64));65CardContent.displayName = "CardContent";6667const CardFooter = React.forwardRef<68 HTMLDivElement,69 React.HTMLAttributes<HTMLDivElement>70>(({ className, ...props }, ref) => (71 <div72 ref={ref}73 className={cn("flex items-center p-6 pt-0", className)}74 {...props}75 />76));77CardFooter.displayName = "CardFooter";7879export {80 Card,81 CardHeader,82 CardFooter,83 CardTitle,84 CardDescription,85 CardContent,86};
Files it writes
More from aomi
All 34 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | aomi | Components | Free | 2 deps | |
| alertalert | aomi | Components | Free | 1 dep | |
| aomi-frameaomi-frame | aomi | Components | Free | 1 dep | |
| aomi-para-provideraomi-para-provider | aomi | Components | Free | 9 deps · 27 files | |
| aomi-privy-provideraomi-privy-provider | aomi | Components | Free | 7 deps · 15 files | |
| aomi-wallet-kitaomi-wallet-kit | aomi | Components | Free | 8 deps · 59 files | |
| aomi-widgetaomi-widget | aomi | Components | Free | 2 deps | |
| assistant-threadassistant-thread | aomi | Components | Free | 6 deps · 23 files |
