UI Kit components
Jira UI Kit components
UI Kit hooks
Forge bridge APIs
Jira bridge APIs
Confluence bridge APIs
Upgrade UI Kit versions
Previous versions

User

To add the User component to your app:

1
2
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.
hideDisplayNamebooleanNoHides the display name to only display the user profile picture.

Examples

Default

1
2
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: