Dynamic Button is an alternative trigger for the Regular File Uploader. It replaces the static upload button with a dynamic control that adapts to your configured sources and current upload state.
Use it when the uploader should feel like a native part of a toolbar, form, chat composer, profile editor, CMS field, or any other compact interface where a full upload panel would take too much space.
Dynamic Button combines source selection, drag and drop, upload progress, and upload-list access in one control.
When no files are selected, it shows the first configured source as the primary action and places the remaining sources inline or in a menu depending on the selected view mode. After files are added, the primary action opens the upload list, while the secondary action lets users cancel, remove failed uploads, or clear uploaded files depending on the current state.
For example, with source-list="local, camera, url, dropbox", the primary
button opens the local file picker and the other sources are available as
secondary actions.
Add the dynamic-button attribute to uc-file-uploader-regular.
Dynamic Button is available for the Regular File Uploader. It uses the same configuration, sources, validation, localization, upload list, and modal behavior as the regular button.
Use dynamic-button-view-mode on uc-config to control how secondary sources are
shown.
The corresponding DOM properties are dynamicButtonViewMode and
dynamicButtonShowFirstIcon.
auto is the default mode. It shows secondary sources inline when there are up
to three configured sources. If there are more than three sources, it moves the
secondary sources into a dropdown menu.
Use auto for most product interfaces where the number of enabled sources can
vary by project or environment.
menu keeps the primary action visible and places all secondary sources in a
dropdown menu.
Use menu when the uploader sits inside a narrow area, but users still need a
clear default source.
toolbar shows the primary action and all secondary sources inline.
Use toolbar when users frequently switch between sources and there is enough
horizontal space, such as an editor toolbar or internal admin UI.
compact shows a single paperclip-style menu button while idle and puts all
configured sources in the menu.
Use compact for dense interfaces such as chat attachments, comment boxes,
table cells, or mobile layouts.
Dynamic Button uses the first item in source-list as the primary action, except
in compact mode where all sources are placed in the menu.
Choose the first source based on the action users are most likely to take:
The primary action text is localized and depends on the source. Built-in source
labels include examples such as Upload from device, Capture with camera,
Take photo, and Record video.
Use compact mode with local, camera, and URL sources. Users get a small
paperclip-style button that still supports every configured source.
Use the camera as the primary source and keep local upload as a secondary fallback.
Use auto mode so small source sets stay inline and larger source sets collapse
to a menu automatically.
Use toolbar mode when operators frequently choose between device upload,
links, and cloud sources.
Use Dynamic Button when:
Use the default Regular File Uploader button when you want a simpler static trigger and do not need source actions or upload state visible in the trigger itself.