Components

BaseLineItemsEditor

An editable list of invoice or quote lines with amounts, add and remove, and total rows.

components/ui/BaseLineItemsEditor.vue
View in the demo

Example

Description
Qty
Price
$
$1,200.00
Description
Qty
Price
$
$1,350.00

Subtotal$2,550.00
Tax
Tax
12%
$306.00

Total$2,856.00

Put it inside the v-form of an editor: the description is required and the price must be positive, so the form's validate() covers every line. Prices take the default currency's symbol and amounts are formatted with it. The totals are yours to compute (discount, tax, shipping) and pass already formatted; a control.<id> slot adds a field to that row, as the invoice editor does with its discount and VAT selects. When the container is narrower than 520px each line stacks: the description on its own row, then quantity, price, amount and remove. Pair it with BaseDocument for a live preview of the same lines.

API

Props

Name
Type
Default
Description
v-model
required
BaseLineItem[]—The lines, each { description, quantity, price } (BaseLineItem). Bind it with v-model; the amount of a line is quantity × price.
totalsBaseLineItemsTotal[][]Rows under the lines, each { id, label, value, strong? } with the value already formatted. strong sets the final total apart with a divider.
description-labelstring—The label and placeholder of the description field. Defaults to "Description".
add-textstring—The text of the add button. Defaults to "Add item".
min-linesnumber1The fewest lines the list keeps; the remove button is disabled at that count.

Events

Name
Payload
Description
@update:modelValue[value: BaseLineItem[]]—
© 2026 melsami UI.
Developer documentation for melsami UI.