> ## 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.

# useSellModal

> The useSellModal hook is used to sell an NFT by accepting an existing offer. It provides the necessary functionality to complete the selling process.

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

## Into your React component:

const { show: showSellModal } = useSellModal({ onError });

const onAcceptOffer = () => {
	showSellModal({
		collectionAddress,
		chainId,
		tokenId,
		order,
	});
};

return <button onClick={onAcceptOffer}>Accept Offer</button>
```

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

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

  <ResponseField name="* return properties" />

  <Expandable>
    <ResponseField name="show" type="(args: ShowSellModalArgs) => void">
      ```ts
      interface ShowSellModalArgs {
      	collectionAddress: Hex;
      	chainId: string;
      	tokenId: string;
      	order: Order;
      	callbacks?: ModalCallbacks;
      }
      ```
    </ResponseField>

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