DocsComponentsProfile List

Profile List

The Profile List component renders a customizable list of user profiles with support for virtual scrolling, loading states, and interactive elements. It’s designed to efficiently display large lists of Ethereum addresses and ENS profiles with various display options.

Add to your project

import { ProfileList } from 'ethereum-identity-kit'
 
export default function ProfileListExample() {
  const profiles = [
    { address: '0x983110309620d911731ac0932219af06091b6744' },
    { address: '0x111111176b0b13ffc31d387d08726772a0492948' },
    { address: '0xc983ebc9db969782d994627bdffec0ae6efee1b3' },
    { address: '0xe2cded674643743ec1316858dfd4fd2116932e63' },
    { address: '0x34ab2a3c4b2ae1c940e5e307f22eb92e47906e28' },
    { address: '0xc9c3a4337a1bba75d0860a1a81f7b990dc607334' },
    { address: '0xa8b4756959e1192042fc2a8a103dfe2bddf128e8' },
  ]
 
  return (
    <ProfileList
      profiles={profiles}
      showTags={true}
      showHeaderImage={true}
      showProfileTooltip={true}
      onProfileClick={(profile) => console.log('Clicked:', profile)}
    />
  )
}
Try it out! - https://playground.ethidentitykit.com/?path=/docs/molecules-profile-list--component-docs

Features

  • Virtual Scrolling: Efficient rendering of large profile lists with virtual list support
  • Loading States: Built-in loading placeholders with configurable row counts
  • Interactive Profiles: Click handlers for profile interactions
  • Tag Support: Display and manage profile tags
  • Responsive Design: Adaptable to different screen sizes and layouts
  • Performance Optimized: Supports overscan rendering for smooth scrolling

Parameters

ParameterDescriptionRequiredDefault Value
profilesArray of profile objects to displayYes-
connectedAddressAddress of the currently connected userNo-
selectedListList number for managing follow statesNo-
isLoadingWhether the list is in loading stateNofalse
loadingRowsNumber of loading placeholder rows to showNo10
showTagsWhether to display profile tagsNofalse
canEditTagsWhether tags can be edited (requires appropriate permissions)Nofalse
showHeaderImageWhether to display header images for profilesNofalse
showProfileTooltipWhether to show ProfileTooltip on hoverNofalse
onProfileClickFunction called when a profile is clickedNo-
useVirtualListEnable virtual scrolling for better performance with large listsNofalse
rowHeightHeight of each row in pixelsNo80
visibleCountNumber of rows visible in the virtual list viewport (for virtual list)No10
overscanCountNumber of extra rows to render outside viewport (for virtual list)No5
preventDefaultScrollWhether to prevent default scroll behavior (for virtual list)Nofalse
darkModeEnables dark mode stylingNofalse
classNameAdditional CSS classes for the containerNo-
styleInline styles for the containerNo-

Profile Object Structure

Each profile object in the profiles array should have the following structure:

interface ProfileItem {
  address: string // Ethereum address (required)
  tags?: string[] // Array of tag strings
  ens?: {
    // ENS information (optional)
    name?: string // ENS name
    avatar?: string // ENS avatar URL
    records?: Record<string, string> // ENS text records
  }
}

Usage Examples

Basic Profile List

const profiles = [
  { address: '0x123...', ens: { name: 'alice.eth' } },
  { address: '0x456...', ens: { name: 'bob.eth' } },
]
 
<ProfileList profiles={profiles} />

With Virtual Scrolling

<ProfileList profiles={largeProfileArray} useVirtualList={true} rowHeight={80} visibleCount={15} overscanCount={5} />

With Tags and Interaction

<ProfileList
  profiles={profiles}
  showTags={true}
  canEditTags={true}
  connectedAddress="0xabcd..."
  onProfileClick={(profile, index) => {
    console.log('Clicked profile:', profile.address)
  }}
/>

With Loading State

<ProfileList profiles={profiles} isLoading={true} loadingRows={8} />

With Profile Tooltips

<ProfileList profiles={profiles} showProfileTooltip={true} connectedAddress="0xabcd..." />

Performance Considerations

For lists with more than 50-100 profiles, consider enabling useVirtualList to maintain smooth scrolling performance. The virtual list only renders visible rows plus a configurable overscan buffer.

⚠️

When using virtual scrolling, ensure the container has a fixed height and the rowHeight prop matches your actual row heights for accurate positioning.

Integration with Other Components

The ProfileList component integrates seamlessly with:

  • ProfileListRow: Used internally to render individual profile items
  • ProfileTooltip: Enabled via showProfileTooltip prop
  • FollowButton: Automatically included in each row when connectedAddress is provided
  • Avatar: Used for profile avatars in each row
  • FollowerTag: Used for displaying relationship states

Styling

The component uses predefined styles and can be customized using the className prop. It automatically adapts to dark mode when the darkMode prop is enabled or when a dark class is applied to the application.

The component is designed to be fully responsive and will adapt its layout based on the available space and screen size.