Skip to content

DamBulkActionsBar Component ​

File Information ​

  • Path: app/components/dam/DamBulkActionsBar.vue
  • Purpose: Shared bulk-action toolbar shown when one or more assets/folders are selected. Renders inline icons for the most common actions and overflows the rest into a v-menu.

Overview ​

DamBulkActionsBar is the single shared bar used on every DAM list/grid page (search, folders, collages, trash, uploaded). It handles:

  • Selected-count chip with a clear-selection button
  • Optional "select all N" prompt for cross-page selection
  • Inline icon buttons (capped by breakpoint and maxVisibleIcons)
  • Overflow v-menu for any actions that don't fit inline
  • Draggable floating mode (via useDraggableBar) when floating is true
  • Skeleton loader state while the page is still loading

Props ​

PropTypeDefaultDescription
itemsDamMenuItem[]requiredAll available action items
selectedCountNumberrequiredNumber of currently selected items
contentLoadingBooleanfalseRenders chip-style skeleton loaders instead of buttons
skeletonCountNumber5How many skeleton chips to show
floatingBooleanfalseMakes the bar absolutely positioned and draggable
showSelectAllPromptBooleanfalseShows the "Select all N" prompt text
totalSelectionCountNumber0The total count shown in the "Select all N" prompt
selectAllLoadingBooleanfalseDisables the select-all prompt while loading
maxVisibleIconsNumber | undefinedundefinedOverride the breakpoint-driven icon cap (useful for narrow toolbars)

Events ​

EventPayloadWhen
clear-selection—User clicks the selected-count chip to deselect all
select-all—User clicks the "Select all N" prompt
actionDamMenuItemUser clicks any action button (inline or overflow)

Inline vs Overflow Split ​

The number of inline icons is capped by breakpoint:

BreakpointMax inline icons
smAndDown2
mdAndDown4
LargerAll

maxVisibleIcons overrides this entirely when provided. Actions beyond the cap move into the overflow v-menu.

Items with visible: false are always hidden before the cap is applied.

Floating / Draggable Mode ​

When floating is true the bar renders with position: absolute and delegates drag logic to useDraggableBar. The composable tracks pointer-down → move → up and updates dragPosition, which the bar applies as left/top inline styles.

Drag position is persisted in localStorage via useDraggableBar so the bar re-appears in the same spot after navigation.

Usage ​

vue
<DamBulkActionsBar
  :items="bulkMenuItems"
  :selected-count="selectedAssets.length"
  :floating="true"
  :show-select-all-prompt="hasMorePages"
  :total-selection-count="totalCount"
  @clear-selection="clearSelection"
  @select-all="selectAll"
  @action="handleBulkAction"
/>

Pages That Use It ​

Used on every DAM list/grid page via the page-specific composable that assembles bulkMenuItems from permitted actions.