Search
Loading...
Skip to content

Icons

Customize the editor’s icons by registering custom SVG icon sets and using them in dock entries, custom components, and other UI elements.

Icons example showing the CE.SDK editor with custom icons in the dock and canvas menu

10 mins
estimated time
Download
StackBlitz
GitHub

CE.SDK uses SVG sprites for icons throughout the editor interface. Each icon is referenced by a symbol ID that starts with @. You can register custom icon sets to replace built-in icons or add new ones for your own custom UI components.

This guide covers how to register custom SVG icon sets, replace dock entry icons with custom icons, and use custom icons in custom UI components.

Registering Custom Icon Sets#

We add custom icons to CE.SDK using the cesdk.ui.addIconSet() method. The method takes two parameters: a unique identifier for the icon set and an SVG sprite string containing symbol definitions.

// Register a custom SVG icon set with multiple symbols
cesdk.ui.addIconSet(
'@custom/icons',
`
<svg xmlns="http://www.w3.org/2000/svg">
<symbol id="@custom/icon/star" viewBox="0 0 24 24" fill="none">
<path d="M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z" fill="currentColor"/>
</symbol>
<symbol id="@custom/icon/heart" viewBox="0 0 24 24" fill="none">
<path d="M20.84 4.61C20.3292 4.099 19.7228 3.69365 19.0554 3.41708C18.3879 3.14052 17.6725 2.99817 16.95 2.99817C16.2275 2.99817 15.5121 3.14052 14.8446 3.41708C14.1772 3.69365 13.5708 4.099 13.06 4.61L12 5.67L10.94 4.61C9.9083 3.57831 8.50903 2.99871 7.05 2.99871C5.59096 2.99871 4.19169 3.57831 3.16 4.61C2.12831 5.64169 1.54871 7.04097 1.54871 8.5C1.54871 9.95903 2.12831 11.3583 3.16 12.39L4.22 13.45L12 21.23L19.78 13.45L20.84 12.39C21.351 11.8792 21.7563 11.2728 22.0329 10.6054C22.3095 9.93789 22.4518 9.22249 22.4518 8.5C22.4518 7.77751 22.3095 7.0621 22.0329 6.39464C21.7563 5.72718 21.351 5.12075 20.84 4.61Z" fill="currentColor"/>
</symbol>
<symbol id="@custom/icon/diamond" viewBox="0 0 24 24" fill="none">
<path d="M6 3H18L22 9L12 21L2 9L6 3Z" fill="currentColor"/>
</symbol>
</svg>
`
);

Each symbol in the SVG sprite must have an id attribute that starts with @. This ID is how you reference the icon throughout CE.SDK. In this example, we register three custom icons: @custom/icon/star, @custom/icon/heart, and @custom/icon/diamond.

SVG Sprite Format Requirements#

When creating custom icon SVG sprites, follow these requirements for proper rendering:

  • Wrap all symbols in an <svg> element with the xmlns attribute
  • Each <symbol> must have a unique id starting with @
  • Include a viewBox attribute on each symbol for proper scaling
  • Use currentColor for fill and stroke values to inherit the current theme color
  • Avoid hardcoded width/height attributes on symbols—let CE.SDK handle sizing

Security Considerations#

Replacing Dock Entry Icons#

Once you’ve registered a custom icon set, you can replace the icons of existing dock entries. We retrieve the current dock order using cesdk.ui.getDockOrder(), modify the entries we want to change, and apply the updated order with cesdk.ui.setDockOrder().

// Get the current dock order and replace the Images dock icon
const dockOrder = cesdk.ui.getDockOrder();
cesdk.ui.setDockOrder(
dockOrder.map((entry) => {
if (entry.key === 'ly.img.image') {
return { ...entry, icon: '@custom/icon/star' };
}
return entry;
})
);

This example replaces the Images dock entry icon with our custom star icon. The key property identifies the dock entry, and we update the icon property to reference our custom icon by its symbol ID.

Using Icons in Custom Components#

You can use custom icons in your own UI components by referencing the icon’s symbol ID in the component builder. When registering a custom component with cesdk.ui.registerComponent(), buttons and other elements accept an icon property.

// Register a custom component that uses a custom icon
cesdk.ui.registerComponent(
'CustomIconButton',
({ builder: { Button } }) => {
Button('heartButton', {
label: 'Heart',
icon: '@custom/icon/heart',
onClick: () => {
console.log('Heart icon button clicked');
}
});
Button('diamondButton', {
label: 'Diamond',
icon: '@custom/icon/diamond',
onClick: () => {
console.log('Diamond icon button clicked');
}
});
}
);
// Add the custom component to the canvas menu
cesdk.ui.setCanvasMenuOrder([
...cesdk.ui.getCanvasMenuOrder(),
'CustomIconButton'
]);

We register a custom component containing two buttons, each using a different custom icon. We then add this component to the canvas menu so the buttons appear when users select elements on the canvas.

Built-In Icons#

CE.SDK includes a built-in icon set named ‘Essentials’ with icons for common editor actions. Each icon is referenced by its symbol ID following the pattern @imgly/IconName. You can use these icons directly in your custom components or as references when replacing dock icons.

Set ‘Essentials’#

NameIcon
@imgly/Adjustments
Adjustments Icon
@imgly/Animation
Animation Icon
@imgly/Appearance
Appearance Icon
@imgly/Apps
Apps Icon
@imgly/ArrowDown
ArrowDown Icon
@imgly/ArrowLeft
ArrowLeft Icon
@imgly/ArrowRight
ArrowRight Icon
@imgly/ArrowUp
ArrowUp Icon
@imgly/ArrowsDirectionHorizontal
ArrowsDirectionHorizontal Icon
@imgly/ArrowsDirectionVertical
ArrowsDirectionVertical Icon
@imgly/AsClip
AsClip Icon
@imgly/AsOverlay
AsOverlay Icon
@imgly/Audio
Audio Icon
@imgly/AudioAdd
AudioAdd Icon
@imgly/Backward
Backward Icon
@imgly/Blendmode
Blendmode Icon
@imgly/Blur
Blur Icon
@imgly/BooleanExclude
BooleanExclude Icon
@imgly/BooleanIntersect
BooleanIntersect Icon
@imgly/BooleanSubstract
BooleanSubstract Icon
@imgly/BooleanUnion
BooleanUnion Icon
@imgly/CaseAsTyped
CaseAsTyped Icon
@imgly/CaseLowercase
CaseLowercase Icon
@imgly/CaseSmallCaps
CaseSmallCaps Icon
@imgly/CaseTitleCase
CaseTitleCase Icon
@imgly/CaseUppercase
CaseUppercase Icon
@imgly/CheckboxCheckmark
CheckboxCheckmark Icon
@imgly/CheckboxMixed
CheckboxMixed Icon
@imgly/Checkmark
Checkmark Icon
@imgly/ChevronDown
ChevronDown Icon
@imgly/ChevronLeft
ChevronLeft Icon
@imgly/ChevronRight
ChevronRight Icon
@imgly/ChevronUp
ChevronUp Icon
@imgly/Collage
Collage Icon
@imgly/ColorFill
ColorFill Icon
@imgly/ColorGradientAngular
ColorGradientAngular Icon
@imgly/ColorGradientLinear
ColorGradientLinear Icon
@imgly/ColorGradientRadial
ColorGradientRadial Icon
@imgly/ColorOpacity
ColorOpacity Icon
@imgly/ColorSolid
ColorSolid Icon
@imgly/ConnectionLostSlash
ConnectionLostSlash Icon
@imgly/Copy
Copy Icon
@imgly/CornerJoinBevel
CornerJoinBevel Icon
@imgly/CornerJoinMiter
CornerJoinMiter Icon
@imgly/CornerJoinRound
CornerJoinRound Icon
@imgly/Crop
Crop Icon
@imgly/CropCoverMode
CropCoverMode Icon
@imgly/CropCropMode
CropCropMode Icon
@imgly/CropFitMode
CropFitMode Icon
@imgly/CropFreefromMode
CropFreefromMode Icon
@imgly/Cross
Cross Icon
@imgly/CrossRoundSolid
CrossRoundSolid Icon
@imgly/CustomLibrary
CustomLibrary Icon
@imgly/Download
Download Icon
@imgly/DropShadow
DropShadow Icon
@imgly/Duplicate
Duplicate Icon
@imgly/Edit
Edit Icon
@imgly/Effects
Effects Icon
@imgly/ExternalLink
ExternalLink Icon
@imgly/EyeClosed
EyeClosed Icon
@imgly/EyeOpen
EyeOpen Icon
@imgly/Filter
Filter Icon
@imgly/FlipHorizontal
FlipHorizontal Icon
@imgly/FlipVertical
FlipVertical Icon
@imgly/FontAutoSizing
FontAutoSizing Icon
@imgly/FontSize
FontSize Icon
@imgly/Forward
Forward Icon
@imgly/FullscreenEnter
FullscreenEnter Icon
@imgly/FullscreenLeave
FullscreenLeave Icon
@imgly/Group
Group Icon
@imgly/GroupEnter
GroupEnter Icon
@imgly/GroupExit
GroupExit Icon
@imgly/Home
Home Icon
@imgly/Image
Image Icon
@imgly/Info
Info Icon
@imgly/LayerBringForward
LayerBringForward Icon
@imgly/LayerBringForwardArrow
LayerBringForwardArrow Icon
@imgly/LayerBringToFront
LayerBringToFront Icon
@imgly/LayerBringToFrontArrow
LayerBringToFrontArrow Icon
@imgly/LayerOpacity
LayerOpacity Icon
@imgly/LayerSendBackward
LayerSendBackward Icon
@imgly/LayerSendBackwardArrow
LayerSendBackwardArrow Icon
@imgly/LayerSendToBack
LayerSendToBack Icon
@imgly/LayerSendToBackArrow
LayerSendToBackArrow Icon
@imgly/LayoutHorizontal
LayoutHorizontal Icon
@imgly/LayoutVertical
LayoutVertical Icon
@imgly/Library
Library Icon
@imgly/LineHeight
LineHeight Icon
@imgly/LinkClosed
LinkClosed Icon
@imgly/LinkOpen
LinkOpen Icon
@imgly/LoopClip
LoopClip Icon
@imgly/LoadingSpinner
LoadingSpinner Icon
@imgly/LockClosed
LockClosed Icon
@imgly/LockOpen
LockOpen Icon
@imgly/Minus
Minus Icon
@imgly/MoreOptionsHorizontal
MoreOptionsHorizontal Icon
@imgly/MoreOptionsVertical
MoreOptionsVertical Icon
@imgly/Move
Move Icon
@imgly/Next
Next Icon
@imgly/None
None Icon
@imgly/ObjectAlignBottom
ObjectAlignBottom Icon
@imgly/ObjectAlignDistributedHorizontal
ObjectAlignDistributedHorizontal Icon
@imgly/ObjectAlignDistributedVertical
ObjectAlignDistributedVertical Icon
@imgly/ObjectAlignHorizontalCenter
ObjectAlignHorizontalCenter Icon
@imgly/ObjectAlignLeft
ObjectAlignLeft Icon
@imgly/ObjectAlignRight
ObjectAlignRight Icon
@imgly/ObjectAlignTop
ObjectAlignTop Icon
@imgly/ObjectAlignVerticalCenter
ObjectAlignVerticalCenter Icon
@imgly/OrientationToggleLandscape
OrientationToggleLandscape Icon
@imgly/OrientationTogglePortrait
OrientationTogglePortrait Icon
@imgly/PageResize
PageResize Icon
@imgly/Paste
Paste Icon
@imgly/Pause
Pause Icon
@imgly/PlaceholderConnected
PlaceholderConnected Icon
@imgly/PlaceholderStripes
PlaceholderStripes Icon
@imgly/Play
Play Icon
@imgly/Plus
Plus Icon
@imgly/Position
Position Icon
@imgly/Previous
Previous Icon
@imgly/Redo
Redo Icon
@imgly/Rename
Rename Icon
@imgly/Reorder
Reorder Icon
@imgly/Repeat
Repeat Icon
@imgly/RepeatOff
RepeatOff Icon
@imgly/Replace
Replace Icon
@imgly/Reset
Reset Icon
@imgly/RotateCCW90
RotateCCW90 Icon
@imgly/RotateCW
RotateCW Icon
@imgly/RotateCW90
RotateCW90 Icon
@imgly/Save
Save Icon
@imgly/Scale
Scale Icon
@imgly/Search
Search Icon
@imgly/Settings
Settings Icon
@imgly/SettingsCog
SettingsCog Icon
@imgly/ShapeOval
ShapeOval Icon
@imgly/ShapePolygon
ShapePolygon Icon
@imgly/ShapeRectangle
ShapeRectangle Icon
@imgly/ShapeStar
ShapeStar Icon
@imgly/Shapes
Shapes Icon
@imgly/Share
Share Icon
@imgly/SidebarOpen
SidebarOpen Icon
@imgly/Split
Split Icon
@imgly/Sticker
Sticker Icon
@imgly/Stop
Stop Icon
@imgly/Straighten
Straighten Icon
@imgly/StrokeDash
StrokeDash Icon
@imgly/StrokeDotted
StrokeDotted Icon
@imgly/StrokePositionCenter
StrokePositionCenter Icon
@imgly/StrokePositionInside
StrokePositionInside Icon
@imgly/StrokePositionOutside
StrokePositionOutside Icon
@imgly/StrokeSolid
StrokeSolid Icon
@imgly/StrokeWeight
StrokeWeight Icon
@imgly/Template
Template Icon
@imgly/Text
Text Icon
@imgly/TextAlignBottom
TextAlignBottom Icon
@imgly/TextAlignCenter
TextAlignCenter Icon
@imgly/TextAlignLeft
TextAlignLeft Icon
@imgly/TextAlignMiddle
TextAlignMiddle Icon
@imgly/TextAlignRight
TextAlignRight Icon
@imgly/TextAlignTop
TextAlignTop Icon
@imgly/TextAutoHeight
TextAutoHeight Icon
@imgly/TextAutoSize
TextAutoSize Icon
@imgly/TextBold
TextBold Icon
@imgly/TextFixedSize
TextFixedSize Icon
@imgly/TextItalic
TextItalic Icon
@imgly/Timeline
Timeline Icon
@imgly/ToggleIconOff
ToggleIconOff Icon
@imgly/ToggleIconOn
ToggleIconOn Icon
@imgly/TransformSection
TransformSection Icon
@imgly/TrashBin
TrashBin Icon
@imgly/TriangleDown
TriangleDown Icon
@imgly/TriangleUp
TriangleUp Icon
@imgly/TrimMedia
TrimMedia Icon
@imgly/Typeface
Typeface Icon
@imgly/Undo
Undo Icon
@imgly/Ungroup
Ungroup Icon
@imgly/Upload
Upload Icon
@imgly/Video
Video Icon
@imgly/VideoCamera
VideoCamera Icon
@imgly/Volume
Volume Icon
@imgly/VolumeMute
VolumeMute Icon
@imgly/ZoomIn
ZoomIn Icon
@imgly/ZoomOut
ZoomOut Icon

Troubleshooting#

Custom Icon Not Appearing#

If your custom icon doesn’t display:

  • Verify the symbol ID starts with @
  • Check that the SVG sprite syntax is valid XML
  • Confirm addIconSet() was called before using the icon
  • Inspect the browser console for SVG parsing errors

Icon Not Scaling Correctly#

If your icon renders at the wrong size:

  • Ensure the viewBox attribute is set on the symbol
  • Avoid hardcoding width and height attributes on the symbol
  • Verify the symbol uses relative coordinates within the viewBox

Icon Color Not Matching Theme#

If your icon doesn’t change color with the theme:

  • Use currentColor for fill and stroke values in SVG paths
  • Avoid hardcoded color values like #000000 or rgb()
  • Check that fillOpacity and strokeOpacity use appropriate values for theme compatibility

API Reference#

MethodDescription
cesdk.ui.addIconSet(id, svgSprite)Registers a custom SVG sprite icon set with the given identifier. The sprite should contain <symbol> elements with IDs starting with @.
cesdk.ui.getDockOrder()Returns the current array of dock entries, each containing id, key, label, and icon properties.
cesdk.ui.setDockOrder(entries)Sets the dock order with the provided array of entries. Use this to modify icons or reorder dock items.
cesdk.ui.registerComponent(id, builder)Registers a custom UI component that can be used in menus, panels, and other UI locations.
cesdk.ui.setCanvasMenuOrder(entries)Sets the canvas menu entries that appear when users select elements on the canvas.