Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.layerswap.io/llms.txt

Use this file to discover all available pages before exploring further.

The onSwapModalStateChange event fires whenever the swap modal is opened or closed.
<LayerswapProvider
  callbacks={{
    onSwapModalStateChange: (open) => {
      console.log("Modal state:", open ? "open" : "closed")
    },
  }}
>
  <Swap />
</LayerswapProvider>

Callback Argument Value

open: boolean