avatar
nrjdalal/avatarFreeComponent
acme publishes no description for this item.
Install it
npx shadcn@latest add https://nrjdalal.dev/r/avatar.jsonSource
1"use client"23import { cn } from "@/lib/utils"4import * as AvatarPrimitive from "@radix-ui/react-avatar"5import * as React from "react"67function Avatar({8 className,9 ...props10}: React.ComponentProps<typeof AvatarPrimitive.Root>) {11 return (12 <AvatarPrimitive.Root13 data-slot="avatar"14 className={cn(15 "relative flex size-8 shrink-0 overflow-hidden rounded-full",16 className,17 )}18 {...props}19 />20 )21}2223function AvatarImage({24 className,25 ...props26}: React.ComponentProps<typeof AvatarPrimitive.Image>) {27 return (28 <AvatarPrimitive.Image29 data-slot="avatar-image"30 className={cn("aspect-square size-full", className)}31 {...props}32 />33 )34}3536function AvatarFallback({37 className,38 ...props39}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {40 return (41 <AvatarPrimitive.Fallback42 data-slot="avatar-fallback"43 className={cn(44 "bg-muted flex size-full items-center justify-center rounded-full",45 className,46 )}47 {...props}48 />49 )50}5152export { Avatar, AvatarImage, AvatarFallback }
What it pulls in
npm packages
Files it writes
More from acme
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | acme | Components | Free | 5 deps · 2 files | |
| alertalert | acme | Components | Free | 4 deps · 2 files | |
| alert-dialogalert-dialog | acme | Components | Free | 6 deps · 3 files | |
| aspect-ratioaspect-ratio | acme | Components | Free | 1 dep | |
| badgebadge | acme | Components | Free | 5 deps · 2 files | |
| breadcrumbbreadcrumb | acme | Components | Free | 5 deps · 2 files | |
| buttonbutton | acme | Components | Free | 5 deps · 2 files | |
| calendarcalendar | acme | Components | Free | 7 deps · 3 files |
