Card
tetra-ui/cardFreeComponent
Displays a card with a header, content, and footer.
Live preview
live · rendered by the registry
Rendered by tetra-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://tetra-ui.com/r/card.jsonSource
1import { Text, View } from "react-native";23import { cn } from "@/lib/utils";45// Components6export const Card = ({7 className,8 ...props9}: React.ComponentProps<typeof View>) => {10 return (11 <View12 className={cn(13 "flex flex-col gap-6 rounded-2xl bg-card py-5 text-card-foreground",14 className15 )}16 data-slot="card"17 {...props}18 />19 );20};2122export const CardHeader = ({23 className,24 ...props25}: React.ComponentProps<typeof View>) => {26 return (27 <View28 className={cn("flex items-start gap-1 px-4", className)}29 data-slot="card-header"30 {...props}31 />32 );33};3435export const CardTitle = ({36 className,37 ...props38}: React.ComponentProps<typeof Text>) => {39 return (40 <Text41 className={cn(42 "font-semibold text-foreground text-xl leading-none",43 className44 )}45 data-slot="card-title"46 {...props}47 />48 );49};5051export const CardDescription = ({52 className,53 ...props54}: React.ComponentProps<typeof Text>) => {55 return (56 <Text57 className={cn("text-muted-foreground text-sm", className)}58 data-slot="card-description"59 {...props}60 />61 );62};6364export const CardContent = ({65 className,66 ...props67}: React.ComponentProps<typeof View>) => {68 return (69 <View70 className={cn("px-4", className)}71 data-slot="card-content"72 {...props}73 />74 );75};7677export const CardFooter = ({78 className,79 ...props80}: React.ComponentProps<typeof View>) => {81 return (82 <View83 className={cn("flex items-center px-4", className)}84 data-slot="card-footer"85 {...props}86 />87 );88};
Files it writes
More from tetra-ui
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | tetra-ui | Components | Free | 1 dep | |
| Action Inputaction-input | tetra-ui | Components | Free | no deps | |
| Alertalert | tetra-ui | Components | Free | no deps | |
| Avataravatar | tetra-ui | Components | Free | no deps | |
| Badgebadge | tetra-ui | Components | Free | no deps | |
| Bottom Sheetbottom-sheet | tetra-ui | Components | Free | 4 deps · 7 files | |
| Buttonbutton | tetra-ui | Components | Free | no deps | |
| Checkboxcheckbox | tetra-ui | Components | Free | 1 dep |
