To add the User
component to your app:
1
import { User } from '@forge/react';
A component that represents a user, displaying details such as name and profile picture, subject to the user's privacy settings.
Name | Type | Required | Description |
---|---|---|---|
accountId | string | Yes | The Atlassian account ID of the user. |
1 2 3 4 5
export const UserExample = () => { return ( <User accountId="5a1234bc8d12345e3f1g11hi" /> ); }
You can access the current user's Atlassian account ID in the app product context.
1 2export const UserInlineExample = () => { return ( <Text> Contributors: <User accountId="5a1234bc8d12345e3f1g11hi" /> </Text> ); }
Rate this page:
Our new navigation is here to guide you on your developer journey. Dive in and explore the refreshed Forge documentation!