UserInfoCard

A component that fetches and displays user information using InfoCard. Automatically constructs profile image URL from user data.

Installation

import { UserInfoCard } from 'uxp/components';

Signature

const UserInfoCard: React.FunctionComponent<UserInfoCardProps>

Examples

Basic usage (no dropdown):

```

Simple details with auto-generated labels (array):

<UserInfoCard userKey={123} details={['Phone', 'Email', 'UserType']} />


```tsx
Details with custom labels and icons (array with objects):

<UserInfoCard userKey={123} details={[ { field: 'Phone', label: 'Phone Number', icon: 'fas phone' }, { field: 'Email', label: 'Email Address', icon: 'fas envelope' }, 'UserType' // Auto-generated label: "User Type" ]} />


```tsx
Full config with layout options (config object):

<UserInfoCard userKey={123} details={{ fields: ['Phone', 'Email', 'OfficePhone', 'UserType'], columns: 2, layout: 'vertical' }} />

<UserInfoCard userKey={123} details={(user) => (

{user.FullName}

{user.Email}

)} />

<UserInfoCard userKey={123} variant="avatar" size="large" shape="circle" details={['Email', 'Phone']} />

Last updated