Widget Controls

import { usePanoraWidget } from "@panoraexchange/widget-sdk"

const widget = usePanoraWidget()

Set the from token in the swap widget

widget.setFromTokenAddress({ tokenType: "token address" })

Set the to token in the swap widget

widget.setToTokenAddress({ tokenType: "token address" })

Open the widget token picker

widget.openTokenPicker()

Close the widget token picker

widget.closeTokenPicker()

Last updated