CreateDirectListingButton

This button is used to create Direct listings for the thirdweb Marketplace v3 contract

It uses the TransactionButton and the createListing extension under the hood which means it inherits all the props of those 2 components.

Example

import { CreateDirectListingButton } from "thirdweb/react";
<CreateDirectListingButton
contractAddress="0x..." // contract address for the marketplace-v3
chain={...} // the chain which the marketplace contract is deployed on
// These props below are the same props for `createListing`
// to get the full list, check the docs link above
tokenId={0n}
assetContractAddress="0x..." // The NFT contract address whose NFT(s) you want to sell
pricePerToken={"0.1"} // sell for 0.1 <native token>
>
Sell NFT
</CreateDirectListingButton>

For error handling & callbacks on transaction-sent and transaction-confirmed, please refer to the TransactionButton docs.

function CreateDirectListingButton(
): Element;

Parameters

Type

let props: Omit<TransactionButtonProps, "transaction"> &
chain: Chain;
client: ThirdwebClient;
contractAddress: string;
};

Returns

let returnType: Element;