Skip to content

List Section ​

ue-list-section is a flexible, multi-column list component that renders rows from an array of items. It supports optional headers, column width control, striped/hoverable rows, a "show more/less" collapse feature, an optional expansion-panel wrapper, and a per-row actions slot.

Usage ​

html
<ue-list-section
  :items="users"
  :item-fields="['name', 'email', 'role']"
  :headers="['Name', 'Email', 'Role']"
  show-header
/>

Props ​

PropTypeDefaultDescription
itemsArrayrequiredArray of data objects to render
itemFieldsArray['name']Dot-notation field paths to display per column
headersArraynullColumn header labels. Defaults to title-cased field names
showHeaderBooleanfalseShow the header row
titleString—Optional title above the list
titleTagString'h3'HTML element for the title
titleClassesString'text-body-1 font-weight-medium'Classes applied to the title
itemClassesString'text-body-2'Classes applied to each data row
headerClassesString'text-body-2 font-weight-bold'Classes applied to the header row
colClassesArray[]Per-column CSS class array
colWidthsArray[]Fixed widths per column, e.g. ['120px', '1fr']
colRatiosArray[]Flex ratios per column, e.g. [2, 1, 1]
actionsHeaderString''Header label for the actions column
stripedBooleanfalseAlternate row background colors
hoverableBooleanfalseHighlight rows on hover
hasRowBottomBorderBooleanfalseAdd a bottom border to each row
verticalAlignTopBooleanfalseAlign cell content to the top
emptyMessageString'No items to display'Message shown when items is empty
rowClassFnFunctionnull(item, index) => String — return extra classes per row
dividerAttributesObject{}Attributes forwarded to v-divider for divider rows
collapsibleBooleanfalseWrap the entire list in an expansion panel
collapseLimitNumbernullAuto-wrap in expansion panel when item count exceeds this value
shrinkAfterNumber20Number of items shown before "show more" button appears
showMoreTextString'Show more'Label for the expand trigger
shrinkTextString'Show less'Label for the collapse trigger
moreItemsTextString'more items'Suffix label next to the hidden item count
modelValueArray|String|Number—Controls the expansion panel open state externally

Slots ​

SlotScopeDescription
field.{n}{value, item, index}Override cell content for column n (0-based)
header.{n}{header}Override header cell for column n
row-actions{item, index}Append an actions column to every row
actions-header—Header for the actions column
title-content—Custom title markup (used with collapsible)
before-items—Content injected before the first row
after-items—Content injected after the last row

Divider Rows ​

Insert a divider between items by adding { _type: 'divider' } to the items array:

js
const items = [
  { name: 'Alice', role: 'Admin' },
  { _type: 'divider' },
  { name: 'Bob', role: 'Editor' },
]

Example — Compact Table with Actions ​

html
<ue-list-section
  :items="orders"
  :item-fields="['reference', 'total', 'status']"
  :headers="['Ref', 'Total', 'Status']"
  show-header
  striped
  hoverable
  :col-ratios="[2, 1, 1]"
  :shrink-after="10"
>
  <template #field.2="{ value }">
    <v-chip :color="value === 'paid' ? 'success' : 'warning'" size="small">
      {{ value }}
    </v-chip>
  </template>
  <template #row-actions="{ item }">
    <v-btn icon="mdi-eye" size="small" variant="text" :href="`/orders/${item.id}`" />
  </template>
</ue-list-section>