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 }
}}
/>
)
}
Following
Followers
Parameters
Parameter | Description | Required | Default Value |
---|---|---|---|
addressOrName | Address or ENS name to lookup stats for. | Yes | - |
list | List to lookup stats for; overrides addressOrName if provided. | No | - |
containerDirection | Direction of the container layout (e.g., ‘row’, ‘column’). | No | ’row’ |
statsDirection | Direction of the stats layout (e.g., ‘row’, ‘column’). | No | ’column’ |
statsStyle | Inline styles for the stats section. | No | - |
containerStyle | Inline styles for the container. | No | - |
onStatClick | Function to be called when a stat is clicked; defaults to navigating to EFP profile with selected stat. | No | defaultOnStatClick |
prefetched | Prefetched stats data with nested structure: { stats: { data, isLoading } } | No | - |
props | Additional props for the <div> element. | No | - |