Skip to main content
DZapWidgetProvider is the root of every widget embed. Pass a config object (WidgetConfig). Changing most fields is picked up on the next render; chain allowlists and store defaults are applied when the provider mounts.
portalContainer mounts widget and wallet dialogs inside that element instead of document.body. Useful when the host app uses a modal stacking context or a shadow root.

Core

Appearance

Default chains

Widget-level chain defaults can be overridden per instance via SwapWidget / ZapWidget props.

Chain allowlists

Omit or pass an empty array to allow all chains of that class. Values are numeric chain IDs (for example 1, 42161, 8453). Solana is 7565164.

Providers and settings

Provider IDs come from the DZap API. Fetch them with fetchSwapBridgeProviders and fetchZapProviders.

Hidden and disabled UI

Hide chrome without removing behavior, or lock form fields so users cannot change them.
To lock a specific token or pool, prefer lockSrc / lockDst on the widget plus identity-only defaults. See Swap and Data helpers.

Persistence and multi-widget pages

Callbacks

config.callbacks mirrors widget events. Use either callbacks or useWidgetEvents.

Type

Import WidgetConfig from @dzapio/widget for the full definition. Fields not listed here are still typed on that export.
Last modified on August 18, 2026