Skip to content
On this page

NcDashboardWidget

Props

Prop nameDescriptionTypeValuesDefault
itemsAn array containing the items to show (specific structure must be respected,
except if you override item rendering in the default slot).
array-[]
showMoreUrlIf this is set, a "show more" text is displayed on the widget's bottom.
It's a link pointing to this URL.
string-''
showMoreLabelThe text of show more button.

Expected to be in the form "More {itemName} …"
string-t('More items …')
loadingA boolean to put the widget in a loading state.boolean-false
itemMenuAn object containing context menu entries that will be displayed for each item.object-{}
showItemsAndEmptyContentWhether both the items and the empty content message are shown.
Usefull for e.g. showing "No mentions" and a list of elements.
boolean-false
emptyContentMessageThe text to show in the empty content area.string-''
halfEmptyContentMessageThe text to show in the half empty content area.string-''

Slots

NameDescriptionBindings
halfEmptyContentIconThe icon to show in the half empty content area.
defaultThe default slot can be optionally overridden. It contains the template of one item.
empty-contentSlot for showing information in case of an empty item list.
emptyContentIconThe icon to show in the empty content area.

Usage

Simplest example with custom item

loading...

Showing items and a half empty content message

loading...

Complete example using NcDashboardWidgetItem

loading...