Components

BaseDocumentEditor

The layout of a document editor: the form next to a live preview that stays in view.

components/ui/BaseDocumentEditor.vue
View in the demo

Example

Client

Items

Description
Qty
Price
$
$900.00
Description
Qty
Price
$
$1,920.00

Subtotal$2,820.00
VAT (12%)$338.40

Total$3,158.40
Preview
QuoteQT-0318
Prepared forHarbor & Pine
Item
Qty
Price
Amount
Discovery workshop1$900.00$900.00
Design system setup3$640.00$1,920.00
Subtotal
$2,820.00
VAT (12%)
$338.40

Total
$3,158.40

The layout of the invoice editor (pages/billing/invoices/[id].vue), so any document editor (a quote, a credit note, a purchase order) gets the same shape: the form on one side and the document as it will be sent on the other, both fed by the same draft. The default slot takes the form (a BaseCard with a v-form, numbered BaseSectionTitle sections and a BaseLineItemsEditor) and #preview takes the BaseDocument, under a small "Preview" label on a muted panel.

From 1000px of container width the form takes 7/12 and the preview 5/12, and with sticky (the default) the preview stays below the app bar while the form scrolls; it reads --v-layout-top, so a demo bar or a taller app bar is counted. Narrower, the preview goes under the form. It is a container query, so the open sidebar or a boxed layout is taken into account and the server HTML already has the right layout.

API

Props

Name
Type
Default
Description
preview-labelstring—The small uppercase label over the preview. Defaults to "Preview".
stickybooleantrueKeeps the preview in view while the form scrolls, below the app bar.

Slots

Name
Slot props
Description
#defaultanyThe editor form.
#previewanyThe live document, usually a BaseDocument with class="elevation-2".
© 2026 melsami UI.
Developer documentation for melsami UI.