Card
nativeui/cardFreeComponent
A card component for React Native applications.
Live preview
live · rendered by the registry
Rendered by nativeui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://nativeui.ribbi.ch/r/card.jsonSource
1import * as React from "react";2import { View, ViewProps } from "react-native";3import { cn } from "@/lib/utils";45interface CardProps extends ViewProps {6 children: React.ReactNode;7 className?: string;8}910function Card({ className, children, ...props }: CardProps) {11 return (12 <View13 className={cn(14 "bg-card rounded-2xl border border-border p-4 shadow-sm",15 className16 )}17 {...props}18 >19 {children}20 </View>21 );22}2324function CardHeader({ className, children, ...props }: CardProps) {25 return (26 <View27 className={cn(28 "flex-row justify-between items-start gap-4 mb-4",29 className30 )}31 {...props}32 >33 {children}34 </View>35 );36}3738function CardTitle({ className, children, ...props }: CardProps) {39 return (40 <View className={cn("flex-shrink", className)} {...props}>41 {children}42 </View>43 );44}4546function CardDescription({ className, children, ...props }: CardProps) {47 return (48 <View className={cn("text-muted-foreground", className)} {...props}>49 {children}50 </View>51 );52}5354function CardContent({ className, children, ...props }: CardProps) {55 return (56 <View className={cn("", className)} {...props}>57 {children}58 </View>59 );60}6162function CardFooter({ className, children, ...props }: CardProps) {63 return (64 <View65 className={cn("mt-4 flex-row items-center justify-end gap-4", className)}66 {...props}67 >68 {children}69 </View>70 );71}7273export {74 Card,75 CardHeader,76 CardFooter,77 CardTitle,78 CardDescription,79 CardContent,80};
What it pulls in
npm packages
Files it writes
More from nativeui
All 29 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | nativeui | Components | Free | 2 deps | |
| Alertalert | nativeui | Components | Free | 2 deps | |
| Alert Dialogalert-dialog | nativeui | Components | Free | 1 dep | |
| Avataravatar | nativeui | Components | Free | 1 dep | |
| Badgebadge | nativeui | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | nativeui | Components | Free | 2 deps | |
| Buttonbutton | nativeui | Components | Free | 2 deps | |
| Calendarcalendar | nativeui | Components | Free | 4 deps |
