Customization (iframe)
Theme (inside embed JSON)
Set appearance via the theme object on your embed config (see Configuration): mode, primaryColor, backgroundColor, textColorPrimary, textColorSecondary, modalColor, cardBorderRadius, buttonBorderRadius.
Pass the whole config on the swap URL as ?config= + encodeURIComponent(JSON.stringify(embedConfig)) so nested theme fields stay valid JSON.
iframe dimensions
Router recommends keeping a similar aspect ratio to the default 420×610 layout. You can change width and height on the <iframe> element, or use a responsive wrapper (see Examples).
Outer container styling
The iframe is a separate document; your site styles the frame and its wrapper:
border: nonefor a flush embedborder-radiusandbox-shadowon the iframe or a wrappingdivmax-widthandmargin: autoto center on the page
Widget Playground
The Widget Playground helps you validate theme and other fields before you copy the JSON into your iframe src builder.
Next steps
- Examples — responsive embed patterns
- npm widget customization — if you later use
@routerprotocol/xplore-widget