WebViewer UI supports style customizations using an API, through a CSS file or using the Modular UI.
See this guide for more information about styling WebViewer with Modular UI.
See this guide for more information about changing the theme.
If you want to change more CSS properties, you can use a custom stylesheet to define them using normal CSS selectors.
To make the customization easier and consistent, WebViewer UI provides 5 top level classes:
Example
The more recent versions of WebViewer (starting with version 11.0) use Web Components as part of a modular UI. Earlier versions use iframe. To learn more about how to access the DOM directly, depending on your version of WebViewer, select either the Web Components tab or iframe tab below. The Web Component vs Iframe article provides more detail about the differences.
Avoid Direct DOM Manipulation
While it is technically possible to access the iframe or Web Component DOM and modify UI elements using querySelector, this approach is strongly discouraged.
WebViewer's internal DOM structure is not part of the public API and may change between releases. Direct DOM manipulation can easily break when upgrading WebViewer, even between minor versions. We recommend using the provided APIs and configuration options instead, which are designed to be stable, supported, and forward-compatible.
WebViewer's UI will be loaded inside a modular UI.
WebViewer's UI will be loaded inside an iframe, so to access the UI DOM elements you can use the iframeWindow property.
When using an external CSS file in WebViewer with a WebComponent and styling a custom modal panel or an existing panel, you should utilize the :host CSS pseudo-class selector.
The :host CSS pseudo-class targets the shadow host of the shadow DOM where the CSS is applied, enabling you to select the WebViewer WebComponent element.
Here’s an example of how this is used.
And here is the content of our main.css file.
WebViewer with new background color and changed icon color

Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales