Skip to main content

InvestorDashboard

The InvestorDashboard component provides a comprehensive portfolio overview for token holders.

Import​

import { InvestorDashboard } from '@mantle-rwa/react';

Basic Usage​

<InvestorDashboard tokenAddress="0x..." />

Props​

PropTypeRequiredDescription
tokenAddressstringYesAddress of the RWA token
showYieldbooleanNoShow yield information
showTransactionsbooleanNoShow transaction history
showChartbooleanNoShow portfolio chart
onTransfer() => voidNoCallback for transfer action
onClaim() => voidNoCallback for claim action
classNamestringNoAdditional CSS class

Examples​

Full Dashboard​

<InvestorDashboard
tokenAddress="0x..."
showYield={true}
showTransactions={true}
showChart={true}
/>

With Actions​

<InvestorDashboard
tokenAddress="0x..."
onTransfer={() => setShowTransferModal(true)}
onClaim={async () => {
await yieldModule.claim();
toast.success('Yield claimed!');
}}
/>

Minimal View​

<InvestorDashboard
tokenAddress="0x..."
showYield={false}
showTransactions={false}
showChart={false}
/>

Dashboard Sections​

Portfolio Summary​

Displays:

  • Token balance
  • Current value (if price feed available)
  • Percentage of total supply
  • KYC/accreditation status

Yield Information​

When showYield={true}:

  • Claimable yield amount
  • Total yield claimed
  • Next distribution date
  • Yield history

Transaction History​

When showTransactions={true}:

  • Recent transfers
  • Mint/burn events
  • Yield claims
  • Pagination support

Portfolio Chart​

When showChart={true}:

  • Balance over time
  • Yield accumulation
  • Interactive tooltips

Customization​

Custom Sections​

<InvestorDashboard
tokenAddress="0x..."
sections={['balance', 'yield', 'transactions']}
renderSection={(section, data) => (
<CustomSection section={section} data={data} />
)}
/>

Custom Actions​

<InvestorDashboard
tokenAddress="0x..."
actions={[
{ label: 'Transfer', onClick: handleTransfer, icon: <SendIcon /> },
{ label: 'Claim Yield', onClick: handleClaim, icon: <ClaimIcon /> },
{ label: 'View Details', onClick: handleDetails, icon: <InfoIcon /> },
]}
/>

Styling​

CSS Variables​

.rwa-investor-dashboard {
--dashboard-background: #1A1A1A;
--dashboard-card-bg: #2D2D2D;
--dashboard-border-radius: 12px;
--dashboard-spacing: 1.5rem;
}

Class Names​

ClassDescription
.rwa-investor-dashboardRoot container
.rwa-dashboard-cardCard component
.rwa-dashboard-balanceBalance display
.rwa-dashboard-yieldYield section
.rwa-dashboard-chartChart container
.rwa-dashboard-transactionsTransaction list

See Also​