avatar
obsidianui/avatarFreeComponent
obsidianui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by obsidianui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://obsidianui.dev/r/avatar.jsonSource
1"use client"23import * as React from "react"4import * as AvatarPrimitive from "@radix-ui/react-avatar"56import { cn } from "@/lib/utils"78function Avatar({9 className,10 ...props11}: React.ComponentProps<typeof AvatarPrimitive.Root>) {12 return (13 <AvatarPrimitive.Root14 data-slot="avatar"15 className={cn(16 "relative flex size-8 shrink-0 overflow-hidden rounded-full",17 className18 )}19 {...props}20 />21 )22}2324function AvatarImage({25 className,26 ...props27}: React.ComponentProps<typeof AvatarPrimitive.Image>) {28 return (29 <AvatarPrimitive.Image30 data-slot="avatar-image"31 className={cn("aspect-square size-full", className)}32 {...props}33 />34 )35}3637function AvatarFallback({38 className,39 ...props40}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {41 return (42 <AvatarPrimitive.Fallback43 data-slot="avatar-fallback"44 className={cn(45 "bg-muted flex size-full items-center justify-center rounded-full",46 className47 )}48 {...props}49 />50 )51}5253export { Avatar, AvatarImage, AvatarFallback }
What it pulls in
npm packages
Files it writes
More from obsidianui
All 111 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| ai-inputai-input | obsidianui | Components | Free | 2 deps | |
| alertalert | obsidianui | Components | Free | no deps | |
| animated-tab-baranimated-tab-bar | obsidianui | Components | Free | no deps | |
| apple-spotlightapple-spotlight | obsidianui | Components | Free | 2 deps | |
| badgebadge | obsidianui | Components | Free | 1 dep | |
| breadcrumbbreadcrumb | obsidianui | Components | Free | 2 deps | |
| buttonbutton | obsidianui | Components | Free | 1 dep | |
| button-groupbutton-group | obsidianui | Components | Free | 1 dep |
