Core
Components
DeIdAvatar

DeIdAvatar

The <DeIdAvatar /> component provides an avatar with a dropdown menu for the signed-in user.

Usage

import { DeIdAvatar } from "@dustlabs/profiles/core";
 
function App() {
  return <DeIdAvatar />
}

Props

import { DeIdAvatarProps } from "@dustlabs/profiles/core";

variant (optional)

"default" | "full"

The variant of the avatar to render. Defaults to "default". Full version displays both the available profile picture and username.

position (optional)

"left" | "right"

The position of the dropdown menu relative to the avatar, only affects default variant. Defaults to "left".

options (optional)

DeIdAvatarOptions

This parameter is an extended interface of DeIdModalOptions. It contains the following additional options:

size (optional)

"tiny" | "small" | "medium"

The size of the avatar. Defaults to "medium".

additionalMenuItems (optional)

ProfileMenuItem[]

interface ProfileMenuItem {
  text: string;
  icon: ReactNode;
  onClick: () => void;
}

Additional menu items to display in the dropdown menu.