Supported slots for UI customization
Nutrient Web SDK provides slot-based UI customization for every major component. Slots are organized by feature domain; you configure them under the ui property when loading the SDK or at runtime via instance.setUI().
This page is the slot reference. For practical code examples, see the slot examples guide. To build a fully custom document UI from scratch, see building headless document UIs.
Every slot accepts one of two forms:
- Full replacement — A function
(getInstance, id) => { render, onMount?, onUnmount? }that returns your own DOM.getInstance()returns the live SDK instance (ornullfor preload slots); see accessing the SDK instance from a slot. - Sub-slot customization — An object
{ header?, body?, footer? }where each region is its own callback. Omitted regions keep their default rendering. A region only renders when the underlying default UI has that region wired up, e.g.aiAssistant.footeris mechanically valid but won’t render if the default panel has no footer container.
To hide any slot, return null from render:
ui: { search: (getInstance, id) => ({ render: () => null }),}Slot inventory
Slots are grouped by the component they customize. Each subsection lists the available slot keys, what they cover, and any sub-slots they expose.
Tools
The tools group exposes two surfaces: primary tools that are always visible and contextual tools tied to specific modes. The names describe when the tools are visible, not how they are laid out, so the SDK can change the visual presentation without breaking the API:
ui: { tools: { main: ..., // Always-visible tools (zoom, page nav, modes, print, export). contextual: ..., // Mode-specific tools (annotation properties, content editor bar, form designer, etc.). },}| Slot | Key path | Description |
|---|---|---|
| Main tools | tools.main | Always-visible, zoom, page navigation, mode switching, layout, undo/redo, print, export. |
| Contextual tools | tools.contextual | Appears when entering an annotation mode, content editor, form creator, measurement, or document crop. Shows annotation properties (color, opacity, border) when an annotation is selected. |
Annotations
Slots for viewing, selecting, and managing annotations:
ui: { annotations: { actions: ..., // Actions for selected annotations. status: ..., // Read-only/locked indicator on hover. textMarkupInline: ..., // Inline toolbar for text selection markup. deleteConfirm: ..., // Delete confirmation dialog. link: ..., // Link annotation editor. note: ..., // Note annotation text popup. },}| Slot | Key path | Trigger | Description |
|---|---|---|---|
| Annotation actions | annotations.actions | Annotation selected | Action buttons (delete, duplicate, custom) for the selected annotation. Replaces customization previously done via annotationTooltipCallback. Call getInstance() and use instance.getSelectedAnnotations() to access selected annotations. |
| Status indicator | annotations.status | Hover on locked/read-only annotation | Status label showing “Locked” or “Read only” flags. |
| Text markup inline | annotations.textMarkupInline | Text selected with markup tools | Inline toolbar for creating highlights, underlines, strikeouts, squiggles. |
| Delete confirmation | annotations.deleteConfirm | Delete triggered | Confirmation dialog before permanently deleting an annotation. Return null from render to skip the confirmation. |
| Link editor | annotations.link | Link annotation interaction | Editor for the link annotation URL or action. |
| Note popup | annotations.note | Note annotation expanded | Popup showing the note’s text content. This is the reader-rendered popup (not the note icon on the canvas). |
Content editor
Confirmations and warnings during content editing sessions. Use instance.saveContentEditingSession() and instance.discardContentEditingSession() to control content editing programmatically:
ui: { contentEditor: { exitConfirm: ..., // Exit with unsaved changes confirmation. downloadConfirm: ..., // Download during editing confirmation. cannotSavePrompt: ..., // Cannot save changes prompt. fontMismatch: ..., // Font mismatch warning. subsetFont: ..., // Subset font warning. },}| Slot | Key path | Description |
|---|---|---|
| Exit confirmation | contentEditor.exitConfirm | Shown when leaving the content editor with unsaved changes. |
| Download confirmation | contentEditor.downloadConfirm | Shown when downloading a document during content editing. |
| Cannot save prompt | contentEditor.cannotSavePrompt | Shown when the content editor cannot persist changes. |
| Font mismatch | contentEditor.fontMismatch | Warning when a font used in the document is not available. |
| Subset font | contentEditor.subsetFont | Warning when a font is only partially embedded in the document. |
Signatures
Electronic signature creation/selection and digital signature verification. These are two distinct features:
- Electronic signatures (
create,list): Hand-drawn or typed signatures applied as annotations. Useinstance.getStoredSignatures()to access saved signatures. - Digital signatures (
digitalSigning,digitalStatus): Cryptographic signatures with certificates for document integrity. Useinstance.getSignaturesInfo()to access validation data.
ui: { signatures: { create: ..., // Electronic signature creation (draw, type, upload). list: ..., // Saved electronic signatures picker. digitalSigning: ..., // Digital signing flow (certificate-based). digitalStatus: ..., // Digital signature validation status. },}| Slot | Key path | Description |
|---|---|---|
| Signature creation | signatures.create | Electronic signature creation view, draw, type, or upload a new signature. |
| Signatures list | signatures.list | Saved electronic signatures picker, select from previously stored signatures. |
| Digital signing | signatures.digitalSigning | Digital signing flow with cryptographic certificates. |
| Digital status | signatures.digitalStatus | Digital signature validation status, certificate chain, integrity, timestamp info. |
Stamps
Stamp creation and template selection:
ui: { stamps: { create: ..., // Custom stamp creation. list: ..., // Stamp template picker. },}| Slot | Key path | Description |
|---|---|---|
| Stamp creation | stamps.create | Custom stamp creation view. |
| Stamp list | stamps.list | Stamp template picker showing available stamps. |
Measurements
Scale calibration and measurement display settings:
ui: { measurements: { calibration: ..., // Scale calibration. settings: ..., // Display settings (precision, unit). },}| Slot | Key path | Description |
|---|---|---|
| Calibration | measurements.calibration | Scale calibration, set a reference distance for accurate measurements. |
| Settings | measurements.settings | Measurement display settings, precision, unit, snapping options. |
Document comparison
Controls and diff view for comparing documents:
ui: { documentComparison: { controls: ..., // Comparison controls (tabs, toggles, exit). view: ..., // Comparison diff view. },}| Slot | Key path | Description |
|---|---|---|
| Controls | documentComparison.controls | Comparison controls, source tabs, diff mode toggles, exit button. |
| View | documentComparison.view | Comparison diff view showing document differences. |
Form creator
Form field design tools:
ui: { formCreator: { propertyEditor: ..., // Form field property editor. },}| Slot | Key path | Description |
|---|---|---|
| Property editor | formCreator.propertyEditor | Form field property editor, shown when a form field is selected in form designer mode. Configure field name, type, validation, and appearance. |
Sidebar
The sidebar group contains the sidebar container slot and supports dynamic custom sidebar panels:
ui: { sidebar: { container: ..., // The sidebar container itself. myCustomPanel: ..., // Any custom sidebar panel (dynamic key). },}| Slot | Key path | Description |
|---|---|---|
| Container | sidebar.container | The sidebar container, thumbnails, outline, annotations, bookmarks, signatures, attachments, layers. Hide to remove the entire sidebar. |
| Custom panels | sidebar.[yourId] | Dynamic custom sidebar panels. See the custom sidebars guide. |
Comment thread
The comment thread is a standalone slot with rich sub-slot support:
ui: { commentThread: ..., // Full replacement or sub-slots.}| Slot | Key path | Sub-slots | Description |
|---|---|---|---|
| Comment thread | commentThread | header, footer, editor, comment | The entire comment thread component. |
| Comment | commentThread.comment | header, body, footer | Individual comment within a thread. |
For detailed comment thread examples, see the comment thread example guide.
Standalone slots
These are single-feature components at the root level of the ui configuration:
ui: { documentEditor: ..., // Page management (reorder, rotate, delete, add). search: ..., // Document text search with result navigation. loader: ..., // Document loading UI. attachmentPreview: ..., // Embedded file attachment preview. passwordPrompt: ..., // Password prompt for protected documents. reloadConfirm: ..., // Reload document confirmation. aiAssistant: ..., // AI assistant panel.}| Slot | Key path | Sub-slots | Description |
|---|---|---|---|
| Document editor | documentEditor | header, body, footer | Page management UI, reorder, rotate, delete, duplicate, add pages. |
| Search | search | header, body, footer | Document text search with result navigation. Use instance.startUISearch(term) for programmatic search. |
| Loader | loader | — | Loading UI shown before the document finishes loading. Supports built-in { type: "progress" } and { type: "skeleton" } modes, or a custom slot callback. |
| Attachment preview | attachmentPreview | header, body, footer | Preview for embedded file attachments. |
| Password prompt | passwordPrompt | header, body, footer | Password input for protected documents. |
| Reload confirmation | reloadConfirm | header, body, footer | Confirmation dialog when the document needs to be reloaded. |
| AI assistant | aiAssistant | header, body, footer | AI assistant panel for document queries and actions. |
Preset
The preset key applies a baseline configuration. Currently supported:
'minimal'— Hides all UI, leaving only the bare page canvas. Individual slot overrides take precedence, allowing selective restoration.
// Canvas-only:NutrientViewer.load({ ui: { preset: 'minimal' },});
// Canvas + custom search only:NutrientViewer.load({ ui: { preset: 'minimal', search: (getInstance, id) => ({ render: () => { const div = document.createElement("div"); div.textContent = "Custom search"; return div; }, }), },});
// Reset to full UI at runtime:instance.setUI({});Quick reference
Full slot key paths at a glance.
| Group | Slot keys |
|---|---|
| Tools | tools.main, tools.contextual |
| Annotations | annotations.actions, annotations.status, annotations.textMarkupInline, annotations.deleteConfirm, annotations.link, annotations.note |
| Content editor | contentEditor.exitConfirm, contentEditor.downloadConfirm, contentEditor.cannotSavePrompt, contentEditor.fontMismatch, contentEditor.subsetFont |
| Signatures | signatures.create, signatures.list, signatures.digitalSigning, signatures.digitalStatus |
| Stamps | stamps.create, stamps.list |
| Measurements | measurements.calibration, measurements.settings |
| Document comparison | documentComparison.controls, documentComparison.view |
| Form creator | formCreator.propertyEditor |
| Sidebar | sidebar.container, sidebar.[customId] |
| Standalone | commentThread, documentEditor, search, loader, attachmentPreview, passwordPrompt, reloadConfirm, aiAssistant |