BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/uifoundry/user-avatar

User Avatar

uifoundry/user-avatar
UnverifiedComponent

uifoundry publishes no description for this item.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/UIFoundry/uifoundry/master/user-avatar.json

Source

registry/components/UserAvatar.tsxraw.githubusercontent.com/UIFoundry/uifoundry/master/user-avatar.json
1import {
2 Avatar,
3 AvatarImage,
4 AvatarFallback,
5} from "@/registry/default/ui/avatar";
6import { getInitials } from "~/utils";
7import type { User } from "~/payload-types";
8import { useSession } from "~/auth/client";
9
10export default function UserAvatar({
11 user,
12 showUsername = false,
13}: {
14 user?: User;
15 showUsername?: boolean;
16}) {
17 const { data: session } = useSession();
18
19 const currentUser = user ?? session?.user;
20
21 if (!currentUser) return <></>;
22
23 if (showUsername) {
24 return (
25 <div className="grid place-items-center">
26 <Avatar>
27 <AvatarImage
28 src={currentUser.image ?? undefined}
29 alt="Profile image"
30 />
31 <AvatarFallback>
32 {getInitials(currentUser.name, 2).toUpperCase()}
33 </AvatarFallback>
34 </Avatar>
35 <p>{currentUser.name}</p>
36 </div>
37 );
38 }
39
40 return (
41 <Avatar>
42 <AvatarImage src={currentUser.image ?? undefined} alt="Profile image" />
43 <AvatarFallback>
44 {getInitials(currentUser.name, 2).toUpperCase()}
45 </AvatarFallback>
46 </Avatar>
47 );
48}

What it pulls in

npm packages

  • react

Other registry items

  • avatar

Files it writes

  • registry/components/UserAvatar.tsx

Facts

Registry
uifoundry
Type
registry:component
Access
Unverified
Files written
1
Licence
NOASSERTION
In the index
at or before 2026-08-01
Last confirmed
3 days ago

Go to the source

uifoundry.dev UIFoundry/uifoundry on GitHub Raw registry item This item as JSON

More from uifoundry

All 54 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Groupanimated-groupuifoundryComponentsUnverified2 deps
ButtonbuttonuifoundryComponentsUnverified3 deps
Call To Action Pair Fieldcall-to-action-pair-fielduifoundryComponentsUnverified3 deps
CardcarduifoundryComponentsUnverified1 dep
Description Fielddescription-fielduifoundryComponentsUnverified2 deps
Flickering Gridflickering-griduifoundryComponentsUnverified1 dep
Header Fieldheader-fielduifoundryComponentsUnverified2 deps
Icon ComponenticonuifoundryComponentsUnverified2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex