Peer dependencies
@tanstack/react-query only needs to be installed. The widget manages its own query client internally.
Tested frameworks
SSR caveat
The widget reads window, localStorage, and prefers-color-scheme on mount. It does not support server-side rendering. In Next.js (or any SSR/SSG framework), gate the import:
Tailwind v4
The widget ships compiled Tailwind v4 styles scoped under the .velora-widget class. You don’t need Tailwind in your host app; the bundled styles are self-contained.
If your host app does use Tailwind, the widget’s scoping prevents its variables from leaking into your global stylesheet, and vice versa. See Customize.
Stylesheet auto-injection
The compiled stylesheet is auto-injected via vite-plugin-lib-inject-css when you import Widget. No explicit .css import is normally needed.
If your bundler strips side-effect imports aggressively (some custom Webpack / Rollup setups), force-include the stylesheet:
Error boundaries
Wrap the widget in an error boundary for production. A widget crash shouldn’t take down your whole page.
Memoize non-primitive config
Passing inline arrays or objects forces a re-render. Memoize them.
Lazy-load when offscreen
If the widget isn’t above the fold, defer it.
Bundle size
The widget is large: it ships wallet connectors, EVM tooling, and the full trading UI. Lazy-loading and route-based code splitting keep the initial bundle small.
Known caveats
- Server-side rendering is not supported (see SSR caveat above).
- Strict-mode double-mount in dev triggers a brief double-fetch of price quotes, harmless and confined to development.
- Sandboxed iframes without
allow-popups and allow-storage-access-by-user-activation will break wallet-connection popups.
Related pages
Last modified on June 14, 2026