DocsComponentsProfile Stats

Profile Stats

The Profile Stats component displays follower and following statistics for a given Ethereum address or ENS name.

Add to your project

import { ProfileStats } from 'ethereum-identity-kit'
 
export default function Home() {
  return <ProfileStats addressOrName="vitalik.eth" />
}

With Prefetched Data

import { ProfileStats, useProfileStats } from 'ethereum-identity-kit'
 
export default function Home() {
  const { stats, isLoading } = useProfileStats('vitalik.eth')
  
  return (
    <ProfileStats 
      addressOrName="vitalik.eth"
      prefetched={{
        stats: { data: stats, isLoading }
      }}
    />
  )
}
Try it out! - https://playground.ethidentitykit.com/?path=/docs/molecules-profile-stats--component-docs
Following
Followers

Parameters

ParameterDescriptionRequiredDefault Value
addressOrNameAddress or ENS name to lookup stats for.Yes-
listList to lookup stats for; overrides addressOrName if provided.No-
containerDirectionDirection of the container layout (e.g., ‘row’, ‘column’).No’row’
statsDirectionDirection of the stats layout (e.g., ‘row’, ‘column’).No’column’
statsStyleInline styles for the stats section.No-
containerStyleInline styles for the container.No-
onStatClickFunction to be called when a stat is clicked; defaults to navigating to EFP profile with selected stat.NodefaultOnStatClick
prefetchedPrefetched stats data with nested structure: { stats: { data, isLoading } }No-
propsAdditional props for the <div> element.No-