> ## Documentation Index
> Fetch the complete documentation index at: https://sequence-0fb8d9e6-shop-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# useCreateListingModal

> The useCreateListingModal hook is used to list an item for sale on the Marketplace. It provides the necessary functionality to create and manage a new listing.

```ts
import { useCreateListingModal } from "@0xsequence/marketplace-sdk/react";

## Into your React component:

const { show: showListModal } = useCreateListingModal({ onError });

const onClickList = () => {
	showListModal({
		collectionAddress,
		chainId,
		collectibleId,
		orderbookKind,
	});
};

return <button onClick={onClickList}>List</button>
```

<ResponseField name="useCreateListingModal">
  <ResponseField name="* params" />

  <Expandable>
    ```ts
    interface useCreateListingModal {
    	onSuccess?: ({ hash, orderId }: {
    	hash?: Hash; 
    		orderId?: string; 
    	}) => void;
    	onError?: (error: Error) => void;
    }
    ```
  </Expandable>

  <ResponseField name="* return properties" />

  <Expandable>
    <ResponseField name="show" type="(args: ShowCreateListingModalArgs) => void">
      ```ts
      interface ShowCreateListingModalArgs {
      	collectionAddress: Hex;
      	chainId: string;
      	collectibleId: string;
      	orderbookKind?: OrderbookKind;
      	callbacks?: ModalCallbacks;
      }
      ```
    </ResponseField>

    <ResponseField name="close" type="() => void" />
  </Expandable>
</ResponseField>
