Available Now: Explore our latest release with enhanced accessibility and powerful IDP features
By Peter Hawker | 2024 Nov 03
4 min
Tags
webviewer
ui customization
Summary: The new Modular UI in WebViewer enhances the clean interface with improved accessibility and a consistent design language. It turns buttons, headers, panels, and flyouts into modular components that can be easily customized and assembled. This approach allows for faster POCs, integration, and time to market, making your application feel bespoke. The Modular UI consists of four categories: Items, Containers, Panels, and Flyouts, all supporting extensive customization and seamless integration.
Earlier this year, we released a preview of the new WebViewer UI, which will ship with our next major version of WebViewer later this fall. Our last major UI refresh was several years ago and though we’ve made countless improvements to the UI over that time, customer feedback pointed us to a new approach.
From a design perspective, the Modular UI refines the clean, out-of-the-box UI that WebViewer ships with while improving accessibility through consistent design language.
On the technical side, Modular UI turns buttons, headers, panels, and flyouts into Lego block-like components that can be quickly and easily assembled to fit your desired design. We chose this approach to enable fluid customization that feels bespoke to your application while allowing for faster POCs, integration, and time to market.
Read more about how to get started with the Modular UI in our Modular UI documentation.
Learn how to add a custom panel to a Tab Panel and make the Tab Panel accessible via a custom button in the header — all using the Modular UI.
The Modular UI has been broken down into four categories of components:
Modular items, such as buttons and toggles, provide dynamic interactions with customizable properties. Modular containers, including headers and grouped items, organize these items into structured layouts. Panels display additional content, like Thumbnails and Bookmarks, on the viewer's sides and can be custom-built or prebuilt. Flyouts are pop-up menus that appear upon user interaction, containing various items and supporting submenus for deeper navigation. These components collectively create a flexible and responsive UI.
Modular items are the building blocks of interactable elements within your UI. Items include buttons, controls, and toggles that can be placed within containers to build the UI. Item can be customized with properties like icons, labels, and specific actions.
Here’s an overview of how they work:
Key Features and Types
Customization and Integration
Read more about how to work with items in our Modular UI documentation.
Modular UI containers are the organizational components that are responsible for creating structured interfaces.
These containers include Modular Headers, Grouped Items, and Ribbon Groups:
These containers support dynamic updates, making it easy to add, modify, or remove components and adjust their layout. By using these containers, developers can create intuitive and adaptable UIs that cater to diverse user needs and interactions.
Read more about creating containers in our Modular UI Containers documentation.
Modular panels enhance user interaction by displaying auxiliary content on either side of the viewer. These panels are highly customizable, allowing for the integration of both prebuilt and custom panels.
Key Features
Read more about working with built-in panels and how to create your own in our Modular UI Panel documentation.
Modular flyouts offer a dynamic way to display additional UI elements and options without cluttering the main interface. Flyouts are essentially menus that appear when users interact with specific UI elements, like the hamburger menu in the out-of-the-box UI.
Key Features
Read more about creating your own flyouts in our Modular UI Flyouts documentation.
Depending on the level of customization that you’re after, you can interact with the modular components using specific APIs or by importing and exporting an entire UI configuration.
You can use APIs to interact with the UI at runtime to create, modify, and remove components from the UI.
For example, this snippet creates a new instance of the rectangle tool and adds it to the default top header using APIs.
const { Tools } = instance.Core;
const rectangleToolButton = new instance.UI.Components.ToolButton({
dataElement: 'rectangleToolButton',
toolName: Tools.ToolNames.RECTANGLE,
});
// This can now be added to a modular header
const defaultHeader = instance.UI.getModularHeader('default-top-header')
defaultHeader.setItems([rectangleToolButton]);
In the following example, an instance of the thumbnail panel is added to open on the left, and a button is added to the header to toggle the panel.
// Thumbnail Panel
instance.UI.addPanel({
dataElement: 'thumbnailPanel',
location: 'right',
render: instance.UI.Panels.THUMBNAIL,
});
// Using the toggle button to open the Thumbnail panel
const thumbnailPanelToggle = new instance.UI.Components.ToggleElementButton({
dataElement: 'thumbnailPanelToggle',
toggleElement: 'thumbnailPanel',
img: 'icon-header-sidebar-line',
title: 'Thumbnail Toggle Panel',
});
// Then this button should be added to a container's item using the setItems API.
// This container can be a modular header or a grouped items container.
const defaultHeader = instance.UI.getModularHeader('default-top-header')
defaultHeader.setItems([thumbnailPanelToggle]);
Read more about the available APIs in our Modular UI documentation.
You can also import and export your UI configuration by defining your UI components, headers, panels, and flyouts within a JSON structure.
Importing and exporting via JSON enables easy customization and management of different UI configurations to match different users:
Importing
Exporting
Read more about importing and exporting UI configurations in our Modular UI Import-Export documentation.
Streamline your Salesforce workflows with Apryse WebViewer. Enhance security and simplify development!
We hope you found this overview of the Modular UI beta for Apryse WebViewer insightful and are excited about the upcoming launch later this year.
Try it out yourself in the Webviewer Showcase.
We'd love to hear your thoughts and suggestions to help refine the product experience. We're looking forward to delivering a feature-rich and customizable solution that meets your needs. Please share your feedback and let us know how we can make this even better for you.
Our solution engineers are available to support your implementation on Discord or through our support portal.
[This article was originally released in Jun 2024]
Tags
webviewer
ui customization
Peter Hawker
Product Management
Share this post
PRODUCTS
Enterprise
Small Business
Popular Content