User

To add the User component to your app:

1 import { User } from '@forge/react';

Description

A component that represents a user, displaying details such as name and profile picture, subject to the user's privacy settings.

Props

NameTypeRequiredDescription
accountIdstringYesThe Atlassian account ID of the user.

Examples

Default

1 2 3 4 5 export const UserExample = () => { return ( <User accountId="5a1234bc8d12345e3f1g11hi" /> ); }

Example image of rendered pictures and names of Atlassian users

You can access the current user's Atlassian account ID in the app product context.


Inline

Example image of a rendered picture and name of an Atlassian user within a Text component

1
2
export const UserInlineExample = () => {
  return (
    <Text>
      Contributors: <User accountId="5a1234bc8d12345e3f1g11hi" />
    </Text>
  );
}

Rate this page: