The dock is a sidebar containing buttons that open asset library panels. You can position it on the left, right, or bottom of the editor. By default it appears on the left side. This guide covers dock positioning, appearance settings, edit mode contexts, and the asset source relationship.

For adding and configuring dock buttons, see Add Dock Buttons. For general component manipulation (reordering, inserting, removing), see the Component Order API Reference.
This guide covers dock positioning, configuring dock appearance settings, setting up edit mode-specific layouts, understanding the relationship between dock entries and asset sources, adding custom registered components, and viewing the default component order.
Dock Position#
Use the at option in setComponentOrder to place the dock on the left, right, or bottom of the editor. When at is omitted, setComponentOrder targets the 'left' position.
// Place dock on the right sidecesdk.ui.setComponentOrder({ in: 'ly.img.dock', at: 'right' }, [ 'ly.img.assetLibrary.dock']);
// Place dock at the bottom (renders horizontally)cesdk.ui.setComponentOrder({ in: 'ly.img.dock', at: 'bottom' }, [ 'ly.img.assetLibrary.dock']);You can place dock components at multiple positions simultaneously. Each position renders independently:
// Main dock on the leftcesdk.ui.setComponentOrder({ in: 'ly.img.dock', at: 'left' }, [ 'ly.img.assetLibrary.dock']);
// Secondary tools on the rightcesdk.ui.setComponentOrder({ in: 'ly.img.dock', at: 'right' }, [ 'my.custom.tool']);On small viewports, all dock positions automatically collapse into a single horizontal dock at the bottom.
Show or Hide the Dock#
Use the Feature API to control dock visibility:
// Hide the dockcesdk.feature.disable('ly.img.dock');
// Show the dock (default)cesdk.feature.enable('ly.img.dock');For more on the Feature API, see Show/Hide Components.
Dock Appearance Settings#
Two editor settings control how dock buttons look. Set dock/iconSize to 'large' for 24px icons or 'normal' for the default 16px. Set dock/hideLabels to true to show icons only.. When hidden, labels appear as tooltips on hover.
// Configure dock to use large icons and hide text labelscesdk.engine.editor.setSetting('dock/iconSize', 'large');cesdk.engine.editor.setSetting('dock/hideLabels', true);| Setting | Values | Description |
|---|---|---|
dock/iconSize | 'normal' | 'large' | Button icon size (16px or 24px) |
dock/hideLabels | boolean | Hide text labels, show icons only |
Edit Mode Context#
The dock supports different component orders for different edit modes. Use the when option in setComponentOrder to define a layout that activates only in a specific mode. The following example sets a simplified dock that appears only when the user enters Text edit mode.
// Set a simplified dock for Text edit modecesdk.ui.setComponentOrder( { in: 'ly.img.dock', when: { editMode: 'Text' } }, [ { id: 'ly.img.assetLibrary.dock', key: 'ly.img.text', icon: '@imgly/Text', label: 'libraries.ly.img.text.label', entries: ['ly.img.text'] } ]);Available edit modes: 'Transform' (default), 'Text', 'Crop', 'Trim', or any custom value. All Component Order API methods accept an optional when context. See the Component Order API Reference for details.
Relationship with Asset Sources#
Asset sources, asset library entries, and dock buttons work together in three steps:
- Create an asset source — Register a source with the engine that stores and provides assets
- Create an asset library entry — Define a UI entry that references the source via
sourceIds - Add a dock button — Insert a button that opens the entry via the
entriesarray
// Add a custom asset source, create an entry for it, and add a dock button// Step 1: Create the asset source (stores/provides assets)cesdk.engine.asset.addLocalSource('my.brand.assets');
// Step 2: Create an asset library entry (UI representation of the source)cesdk.ui.addAssetLibraryEntry({ id: 'my.brand.entry', sourceIds: ['my.brand.assets'], previewLength: 3, gridColumns: 3, gridItemHeight: 'square'});
// Step 3: Add a dock button that opens the entrycesdk.ui.insertOrderComponent( { in: 'ly.img.dock', position: 'end' }, { id: 'ly.img.assetLibrary.dock', key: 'brand', entries: ['my.brand.entry'], label: 'Brand', icon: '@imgly/Favorite' });The entries array on the dock button takes entry IDs, not source IDs. If the entry ID doesn’t exist, the button won’t appear.
Adding Custom Registered Components#
Register fully custom components and add them to the dock. Use cesdk.ui.registerComponent() to define a component with the builder pattern, then insert it into the dock order. A spacer pushes the custom button to the bottom of the dock.
// Register a custom component and add it to the dock bottomcesdk.ui.registerComponent('my.settings.button', ({ builder }) => { builder.Button('settings', { label: 'Settings', icon: '@imgly/Settings', onClick: () => { cesdk.ui.showNotification({ message: 'Settings panel would open here', type: 'info', duration: 'short' }); } });});
cesdk.ui.insertOrderComponent({ in: 'ly.img.dock', position: 'end' }, [ 'ly.img.spacer', 'my.settings.button']);For the complete builder API documentation, see Register a New Component.
Default Component Order#
Retrieve the current dock order with getComponentOrder to inspect the default layout. For detailed descriptions of each component ID, see the Component Reference.
// Retrieve and log the current dock order for referenceconst currentOrder = cesdk.ui.getComponentOrder({ in: 'ly.img.dock'});console.log('Current dock order:', currentOrder);Asset Library Buttons#
| Component ID | Description |
|---|---|
ly.img.assetLibrary.dock | Asset library button (configurable with key, label, icon, entries) |
Layout#
| Key | Type | Description |
|---|---|---|
key | string | Unique identifier within the dock. |
label | string | Button label. If a matching I18N key is found, it is localized. |
icon | CustomIcon | A URL string pointing to an SVG, a built-in icon ID (see Icons), or a callback returning a URL. |
entries | string[] | Asset entries shown when the button is pressed. A single entry opens directly; multiple entries show a group overview. |
onClick | () => void | Custom click handler. If provided, overrides the default asset library toggle behavior. |
isSelected | boolean | (() => boolean) | Controls the selected state of the button. |
isDisabled | boolean | (() => boolean) | Controls the disabled state of the button. |
size | 'normal' | 'large' | Size of the button. Defaults to 'normal'. |
variant | 'regular' | 'plain' | Visual variant of the button. Defaults to 'regular'. |
color | 'accent' | 'danger' | Color scheme of the button. |
API Reference#
| Method | Purpose |
|---|---|
cesdk.ui.getComponentOrder({ in: 'ly.img.dock', at? }) | Get dock component order at a position |
cesdk.ui.setComponentOrder({ in: 'ly.img.dock', at? }, order) | Set dock component order at a position |
cesdk.ui.insertOrderComponent({ in: 'ly.img.dock', at? }, c) | Insert components into the dock |
cesdk.ui.updateOrderComponent({ in: 'ly.img.dock', at? }, u) | Update dock components |
cesdk.ui.removeOrderComponent({ in: 'ly.img.dock', at? }) | Remove dock components |
cesdk.ui.registerComponent() | Register custom components for dock use |
cesdk.engine.editor.setSetting() | Configure dock appearance settings |