Frameworks
Integrations
Mendix
SharePoint
Modular UI
Legacy UI
AnnotationManager
Annotation Types
Customize
Version 11
Version 10
v10.12
v10.11
v10.10
v10.9
v10.8
v10.7
v10.6
v10.5
v10.4
v10.3
v10.2
v10.1
v10.0
Version 8
v8.12
v8.11
v8.10
v8.9
v8.8
v8.7
v8.6
v8.5
v8.4
v8.3
v8.2
v8.1
v8.0
Version 7
Version 6
v6.3
v6.2
v6.1
v6.0
Version 5
Version 4
Version 3
Version 2
WebViewer Server
WebViewer BIM
Items are the building blocks of WebViewer Modular UI. They are components that are placed inside containers. They include buttons and prebuilt components such as the page controls and zoom controls. All items inherit properties from the same base class and can be modified in similar ways. They can also be placed in different containers to make them easier to manage and reuse.
There are many different items in the default UI which include Toggle Buttons, Tool Buttons, Ribbon Items, View Controls, Zoom Controls, and Page Controls among others.
Items are also highly customizable. For example, a button can have a label or an icon or even both depending on the properties set.
Custom buttons, also referred to as Action Buttons, allow you to specify the icon, title, and onClick behaviour. These can include any kind of function call, such as posting data to a server.
When incorporating icons into your project, you have two options: utilize custom icons by providing a local path, or select from the extensive collection included with WebViewer by specifying the icon's file name. To explore the available icons and their corresponding file names, refer to the comprehensive list here.
The code above creates a custom button which will look like this:
Stateful buttons are buttons that can have state within them. These are generally used for tools or viewing modes, where we want to change the style of the button depending on the state (e.g. active tool vs not active).
The code above creates a stateful button which toggles between Single Page and Double Page states and will look like this:
Toggle Element Buttons, also known as Toggle Buttons, are buttons that can be used toggle specified elements on and off in the UI. These are generally used for opening panels, such as the Notes Panel or the Thumbnails Panel, or for activating special modes such as Form Field Editing Mode or Content Editing Mode.
One of the most common use cases for this type of button is to toggle the visibility of the Style Panel like so:
Tool Buttons are buttons that are used to activate a specific tool.
In the Modular UI they are abstractions that can be used to easily add a tool button anywhere in the UI as shown in the example below:
Tool buttons can also be customized by passing in a custom img
, label
, or title
.
See api guide for list of available tool names that can be used with Tool Buttons.
In the above list of tools you will find some tools have multiple instances, and use names such as RECTANGLE2, RECTANGLE3, etc. These are different instances of a tool that have different pre-set styles. If your UI requires multiple instances of the same tool as separate tool buttons, with different styles for each you can leverage these.
Ribbon Items are a special type of item that are used within a Ribbon Group to create a ribbon. They are used to set which Grouped Items should appear in the secondary header in the default UI.
For a full code samples of adding ribbon items to the UI, see the Ribbon Group documentation.
The Modular UI features a variety of prebuilt items designed to streamline the integration of commonly used viewer functionalities. These components allow for easy placement anywhere within the viewer, eliminating the need to recreate their internal logic. Among these are the Preset Items, which are buttons engineered to handle frequent actions such as downloading documents and initiating print options. Additionally, the prebuilt items include Page Controls, Zoom Controls, and View Controls. These render components that manage the viewer's state, enabling settings adjustments for the current page, zoom level, and page orientation.
Preset buttons are buttons that are already defined in the default UI. These include buttons such as the Save Button, Print Button, and Download Button. These buttons are generally used to perform actions on the document or toggle different modes like Content Edit Mode or Form Field Creation Mode.
You can find a full list of the available preset buttons in the PresetButton class documentation.
The following code creates a new Preset Save Button:
Page Controls are used to navigate through the pages of a document. They include a page number input which shows the current page along with the total pages and buttons to move to the previous page and the next page in the document.
Page controls can be placed inside of containers and can be customized to fit the needs of your application.
The following code creates a new Page Controls item:
Adding a Page Controls item to a vertical container like a left-placed Modular Header, will set the Page Controls to be vertical as well.
View Controls in WebViewer let you adjust the display settings of a document. These settings include options to change how you navigate through the document (like scrolling continuously or flipping page by page), rotate the document, choose the document layout (such as viewing one page at a time or two pages side-by-side), and a button to view the document in full screen.
This component gets added to the UI as a toggle button which can be used to show or hide the View Controls Flyout Menu.
The following code creates a new View Controls item:
The Zoom component is used to change the zoom level of the document. It includes buttons to zoom in and zoom out, and an input field to manually change the zoom level. There is also a dropdown button which opens a Zoom Flyout Menu which contains a list of preset zoom levels as well as Fit To Width and Fit To Page buttons and a button to activate marquee zooming (changing the zoom level by clicking or cmd/ctrl+clicking).
The following code creates a new Zoom item:
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales