Skip to main content

Tools and menus Stable

The tool bar at the bottom of the editor changes with the selection: one bar when nothing is selected, another for a video clip, a text clip and so on. You can remove the tools you don't offer and add your own.

Remove tools​

Hide built-in tools by id. Hiding a tool removes it from every bar it appears in; hiding a panel tab (such as mask) removes that tab, and a panel with no tabs left disappears.

dock.hideMenuItems(["sticker", "mask", "voice"])

Each call replaces the previous list.

Add your own tools​

Add a tool to any bar: it shows with your label and icon, and a tap tells your app its id. Use it for what your app does around the edit: share, save as a template, generate captions with your service, open your help.

dock.addMenuItem(EditorMenuItem(id: "share", label: "Share", icon: "share", menu: .root))
dock.setIcon("share", svg: shareIconSVG)
dock.onCustomItem = { id in
if id == "share" { presentShareSheet() }
}
Field
idYour id; it comes back when the tool is tapped. Adding a tool with the same id replaces it.
labelShown under the icon, as written (it isn't translated).
menuThe bar: root (nothing selected), video, image, sticker, text, audio, effects or solid.
iconA built-in icon name, or one you set with setIcon.
afterThe id of the tool it follows; at the end when unset.

To act on the selected clip, read the selection when the tool is tapped (selectedClips() on iOS, Android and React Native; selectedClip on the web).

Built-in tools​

Ids are shared between bars: delete is the same tool on every clip's bar, so hiding it hides it everywhere. That includes audio and effects, which are both an "add" tool on the root bar and a panel on clips' bars: hiding audio removes both. Panels list their tabs after a colon.

BarTools
rootmedia, text, overlay, audio, sticker, effects
videosplit, edit: transform crop flip opacity mask; effects: looks adjust fx; animation: in out loop; speed; audio: volume voice audio_fx; duplicate, delete
image, stickersplit, edit (as video), effects, animation, duplicate, delete
textedit_text, font, style: presets color background box; animation: in out loop captions; effects; edit: transform opacity; split, duplicate, delete
audiosplit, audio: volume voice audio_fx; speed, duplicate, delete
effectssplit, effects: looks adjust fx audio_fx; edit, duplicate, delete
solidsplit, edit: color transform crop opacity mask; effects, animation, duplicate, delete

Preview New tools can appear in later releases. If your app must show an exact set, check the bars when you upgrade.