NFTCard

Components used to display NFTCard.

Basic Usage

#16
Preview
My NFT
This is description
1.23 ETH
1.6k
Preview
No:16
My NFT
This is description
1.23 ETH
1.6k

Dark Mode

#16
Preview
My NFT
This is description
1.23 ETH
1.6k
Preview
No:16
My NFT
This is description
1.23 ETH
1.6k

Use with wagmi

#42

Error Handling

#42
#42
#16
Preview
My NFT
This is description

API

PropertyDescriptionTypeDefaultVersion
addressThe address of the NFT. For Bitcoin, it is the inscription id or inscription number.string--
tokenIdThe tokenId of the NFTnumber | bigint--
getNFTMetadataThe method to get the metadata of the NFT(address: string, tokenId?: number | bigint) => Promise<NFTMetadata>--
actionTextThe text of the main button in the cardReact.ReactNode'Buy Now'-
antdImagePropsThe props of antd Image componentImageProps--
classNameThe className of the cardstring--
descriptionThe description of the cardReact.ReactNode--
imageThe image of the cardstring | React.ReactNode--
likeThe props of likeLikeProps--
priceAsset priceCryptoPriceProps--
footerThe footer of the cardReact.ReactNode--
nameThe name of the cardstring--
styleThe style of the cardReact.CSSProperties--
showActionWhether to show the action button of the cardbooleantrue-
typeThe type of the card'default' | 'pithy''default'-
onActionClickThe callback when the action button of the card is clicked() => void--
errorRenderRendering method for displaying exception information when NFT gets an exception(error: Error) => React.ReactNode--
localeMultilingual settingsLocale["NFTCard"]--

The definition of NFTMetadata refers to the Ethereum ERC721 standard, see NFTMetadata document for details.

LikeProps

PropertyDescriptionTypeDefaultVersion
likedWhether the card is likedboolean--
totalLikesThe total number of likesnumber--
onLikeChangeThe callback when the like status changes(isLike: boolean) => void--
  • CryptoPriceNFTImage