Collectible
A component for displaying NFT collectibles with metadata and image support.
Collectible
The Collectible component displays NFT collectibles with automatic metadata resolution and image display.
Usage
Props
Prop | Type | Default | Description |
---|---|---|---|
chain_id | number | - | Chain ID where the NFT exists |
address | string | - | NFT contract address |
token_id | number | - | Token ID of the NFT |
className | string | - | Additional CSS classes |
Features
- Automatic metadata resolution from IPFS
- Displays NFT image and name
- Shows token ID
- Supports ERC721 standard
- Responsive layout with fixed dimensions
- Loading state handling
Examples
Basic NFT Display
In a Grid Layout
With Custom Styling
Component Structure
-
Container
- Fixed width of 120px
- Rounded corners
- Border
- Overflow hidden
-
Image
- Fixed dimensions (120x120)
- Maintains aspect ratio
- Centered display
-
Info Section
- White background
- Token ID display
- NFT name
- Proper padding
Metadata Resolution
The component automatically:
- Fetches token URI from the contract
- Resolves IPFS metadata
- Extracts image URL and name
- Handles IPFS gateway resolution
Edit on GitHub
Last updated on