This component no longer exists. It was in @nivalis/ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.
Avatar
nivalis-ui/avatarRemovedComponent
An avatar component.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/nivalis-studio/nivalis-ui/main/public/r/avatar.jsonSource
1'use client';23import { Fallback, Image, Root } from '@radix-ui/react-avatar';4import { cn } from '@/lib/classnames';5import type { ComponentProps } from 'react';67const AvatarRoot = ({ className, ...props }: ComponentProps<typeof Root>) => {8 return (9 <Root10 className={cn(11 'relative flex size-8 shrink-0 overflow-hidden rounded-full',12 className,13 )}14 data-slot='avatar'15 {...props}16 />17 );18};1920const AvatarImage = ({ className, ...props }: ComponentProps<typeof Image>) => {21 return (22 <Image23 className={cn('aspect-square size-full', className)}24 data-slot='avatar-image'25 {...props}26 />27 );28};2930const AvatarFallback = ({31 className,32 ...props33}: ComponentProps<typeof Fallback>) => {34 return (35 <Fallback36 className={cn(37 'flex size-full items-center justify-center rounded-full bg-muted',38 className,39 )}40 data-slot='avatar-fallback'41 {...props}42 />43 );44};4546const Avatar = Object.assign(AvatarRoot, {47 Image: AvatarImage,48 Fallback: AvatarFallback,49});5051export { Avatar };
What it pulls in
npm packages
