CnMassActionBar
Mass action dropdown button for selected items. Appears when items are selected in a table or card grid.
Wraps: NcActions, NcActionButton
Try it
Loading CnMassActionBar playground…

Props
| Prop | Type | Default | Description |
|---|---|---|---|
selectedIds | Array | [] | Selected item IDs |
count | Number | 0 | Number of selected items |
showImport | Boolean | true | Show mass import action |
showExport | Boolean | true | Show mass export action |
showCopy | Boolean | true | Show mass copy action |
showDelete | Boolean | true | Show mass delete action |
menuLabelTemplate | String | 'Mass Actions (\{count\})' | |
importLabel | String | Import action label | |
exportLabel | String | Export action label | |
copyLabel | String | Copy action label | |
deleteLabel | String | Delete action label |
Events
| Event | Description |
|---|---|
mass-import | Import action triggered |
mass-export | Export action triggered |
mass-copy | Copy action triggered |
mass-delete | Delete action triggered |
Slots
| Slot | Scope | Description |
|---|---|---|
#actions | \{ count, selectedIds \} | Custom mass action buttons |
Usage
<CnMassActionBar
:selected-ids="selected"
:count="selected.length"
@mass-delete="onMassDelete"
@mass-export="onMassExport">
<template #actions="{ count }">
<NcActionButton @click="onCustomAction">
Custom Action ({{ count }})
</NcActionButton>
</template>
</CnMassActionBar>
Reference (auto-generated)
The tables below are generated from the SFC source via vue-docgen-cli. They reflect what's actually in CnMassActionBar.vue and update automatically whenever the component changes.
Props
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
selectedIds | array | [] | Array of selected item IDs | |
count | number | 0 | Number of selected items | |
showImport | boolean | true | Whether to show the built-in Import action | |
showExport | boolean | true | Whether to show the built-in Export action | |
showCopy | boolean | true | Whether to show the built-in Copy action | |
showDelete | boolean | true | Whether to show the built-in Delete action | |
menuLabelTemplate | string | () => t('nextcloud-vue', 'Mass actions (\{count\})') | Label template for the menu button. Use {count} for the count. | |
importLabel | string | () => t('nextcloud-vue', 'Import') | ||
exportLabel | string | () => t('nextcloud-vue', 'Export') | ||
copyLabel | string | () => t('nextcloud-vue', 'Copy') | ||
deleteLabel | string | () => t('nextcloud-vue', 'Delete') |
Events
| Name | Payload | Description |
|---|---|---|
mass-import | — | |
mass-export | — | |
mass-copy | — | |
mass-delete | — |
Slots
| Name | Bindings | Description |
|---|---|---|
actions | count, selected-ids |