Docs
Profile Avatar Button
Profile Avatar Button
A profile element which contains profile avatar, profile name and profile DID.

CoffeeLover
0x8a0...098b95
Installation
pnpm dlx shadcn@latest add "https://akasha-ui.pages.dev/r/styles/default/profile-avatar-button.json"
Usage
import {
ProfileAvatarButton,
ProfileAvatarButtonAvatar,
ProfileAvatarButtonAvatarFallback,
ProfileAvatarButtonAvatarImage,
ProfileDidField,
ProfileName,
} from "<path-to-ui-components>/profile-avatar-button";
<ProfileAvatarButton profileDID="did:pkh:eip155:11155111:0x8a022905463998860516390fb27548479a098b95">
<ProfileAvatarButtonAvatar>
<ProfileAvatarButtonAvatarImage
src="https://github.com/akashaorg.png"
alt="@akashaorg"
/>
<ProfileAvatarButtonAvatarFallback />
</ProfileAvatarButtonAvatar>
<ProfileName>coffeelover</ProfileName>
<ProfileDidField />
</ProfileAvatarButton>
Props
Name | Type | Description |
---|---|---|
profileDID | string | DID of a profile. |
size | sm , md , or lg | Component sizes. |
nsfw | boolean | Not safe for work. |
nsfwLabel | string | Not safe for work label. |
vertical | boolean | Positions the profile avatar above other components, applicable only when the size is large. |
metadata | ReactNode | Metadata element. |
Examples
Large vertical

CoffeeLover
0x8a0...098b95
Large horizontal

CoffeeLover
0x8a0...098b95
Medium

CoffeeLover
0x8a0...098b95
Small

CoffeeLover
0x8a0...098b95
Metadata

CoffeeLover· 5 mins ago
0x8a0...098b95
Not safe for work(NSFW)
CoffeeLoverNSFW
0x8a0...098b95