Avatar
roi-ui/avatarFreeItem
An image element with a fallback for representing the user.
Install it
npx shadcn@latest add https://roiui.com/r/avatar.jsonSource
1"use client";23import { Avatar } from "@base-ui/react/avatar";4import { cn } from "@/lib/utils";5import styles from "./avatar.module.css";67function AvatarRoot({ className, ...props }: Avatar.Root.Props) {8 return <Avatar.Root className={cn(styles.root, className)} data-slot="avatar-root" {...props} />;9}1011function AvatarImage({ className, ...props }: Avatar.Image.Props) {12 return <Avatar.Image className={cn(styles.image, className)} data-slot="avatar-image" {...props} />;13}1415function AvatarFallback({ className, ...props }: Avatar.Fallback.Props) {16 return <Avatar.Fallback className={cn(styles.fallback, className)} data-slot="avatar-fallback" {...props} />;17}1819export { AvatarRoot as Avatar, AvatarFallback, AvatarImage };
Files it writes
More from Roi UI
All 123 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Roi UI | Other | Free | no deps · 2 files | |
| Accordion (Tailwind)accordion-tailwind | Roi UI | Other | Free | no deps | |
| AI Chatai-chat | Roi UI | Other | Free | no deps · 2 files | |
| AI Chat (Tailwind)ai-chat-tailwind | Roi UI | Other | Free | no deps | |
| Alertalert | Roi UI | Other | Free | 1 dep · 2 files | |
| Alert Dialogalert-dialog | Roi UI | Other | Free | no deps · 2 files | |
| Alert Dialog (Tailwind)alert-dialog-tailwind | Roi UI | Other | Free | no deps | |
| Alert (Tailwind)alert-tailwind | Roi UI | Other | Free | 1 dep |
