Thirdweb Logo

NFT Collection


NFT Collection is for one-of-one NFTs that can be created at any time.

The NFT Collection is suited for cases where 1 media file is mapped to 1 token (NFT). In other words, you don't want to mint an NFT multiple times with the same asset (like an image).

Check out the documentation here.

Loading...


How It Works

export default function NFTCollection() {
const {contract: nftCollection} = useContract("<your-contract-address-here>");
const { data: nfts } = useNFTs(nftCollection);
return (
<div>
{nfts?.map((nft) => (
<div key={nft.metadata.id.toString()}>
<ThirdwebNftMedia
metadata={nft.metadata}
/>
<h3>{nft.metadata.name}</h3>
</div>
))}
</div>
)
}