Panora
  • 👋Welcome to Panora
  • 🌐Official Links
  • PRODUCT SUITE
    • 💱Panora Swap
    • 📊Panora Trade
  • Developer
    • 💻Swap Widget
      • Install Widget
      • Widget Configuration
      • Theme Customization
      • Widget Controls
      • Guide
    • 🤖Swap API & SDK
      • 💻Swap API
        • Examples
      • 🖥️Swap SDK
      • 💦Supported Sources
    • 🎞️Swap iframe
    • 🪙Token List
      • 📔How to Add Your Token to the Panora Token List
    • 💲Token Prices
  • PARTNERSHIPS
    • 🤝Become Our Partner
    • 🏢Media & Brand Kit
  • FAQs
    • ❓Panora Help
  • LEGAL
    • 🗒️Legal Disclaimer
    • 🔓Brand & Logos
    • 📏Terms of Use
Powered by GitBook
On this page
  1. Developer
  2. Swap Widget

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()
PreviousTheme CustomizationNextGuide

Last updated 1 year ago

💻