Components

BaseBreakdownCard

A total split into parts, with a segmented bar and a legend that can filter a table.

components/ui/BaseBreakdownCard.vue
View in the demo

Example

Revenue this month
$48,250.00from 312 orders
Online grew 12% against last month.

Use it above a list to show how a total splits: receivables by age, revenue by channel, stock by state. The module computes the parts and passes them as segments; with selectable, each legend item emits select with its id so the page can filter its table, and active marks the selected one. The caption slot takes markup, such as a coloured "collected this month". Invoices use it through InvoiceReceivablesCard.

API

Props

Name
Type
Default
Description
title
required
string—The small label over the figure, such as "Outstanding".
value
required
string | number—The total, already formatted.
segments
required
BaseBreakdownSegment[]—The parts of the total { id, label, value, color, display? }: value sizes the bar and display (a formatted amount) is shown in the legend instead of the raw value.
captionstring—A short line next to the total, such as "in 4 invoices". The caption slot replaces it with markup.
notestring—A quiet sentence under the bar, such as the average time to get paid.
labelstring—The accessible name of the bar and the legend. Defaults to the title.
selectablebooleanfalseTurns the legend items into buttons that emit select, to filter a table by part.
activestring | nullnullThe id of the selected part.

Slots

Name
Slot props
Description
#caption—Replaces the caption next to the total.

Events

Name
Payload
Description
@select[id: string]The id of the clicked part.
© 2026 melsami UI.
Developer documentation for melsami UI.