Toolbox component reference
Every toolbox component with its purpose, settings, data binding and limits. Left panel in the DocStudio designer interface.
This page lists every component in the toolbox. Settings names are the names used in the template JSON and in the inspector. All components also share the common settings listed at the end.
Content components
Text
Shows text made of segments. A segment is fixed text or a data binding or calculation.
| Setting | Meaning |
|---|---|
content |
The list of segments. Edited in the Content group of the inspector |
width, height |
Optional size: a number in millimetres, auto or a percentage |
Bound values are shown inside an isolated text run so right-to-left and left-to-right text mix correctly. Missing data follows the page policy: a dash by default, see Missing, null and wrong-type data. Guide: Text.
Image
| Setting | Meaning |
|---|---|
src |
Required. asset:<identifier> for an asset the host provides, or an https:// address |
alt |
Alternative text |
fit |
contain, cover, fill or none |
Other schemes (data:, file:, http:, javascript:) are rejected by validation. The host decides how an asset identifier becomes bytes. In PDF output an image that cannot be resolved is left out. Guide: Image.
Barcode
| Setting | Meaning |
|---|---|
value |
Required. A fixed value or an expression, usually a data path |
format |
Required. code128, code39 or ean13 |
height |
Height of the bars area. The default is 15 mm |
The value can be at most 80 characters. A value the format cannot encode (for example letters in EAN-13, or a bad check digit) draws nothing and reports a warning. Guide: Barcode.
QR code
| Setting | Meaning |
|---|---|
value |
Required. Fixed text or an expression |
size |
Side length in millimetres, 25 by default |
A QR symbol holds up to 213 bytes in this implementation. An empty or too long value draws nothing and reports a warning. Guide: QR code.
Shape
| Setting | Meaning |
|---|---|
shape |
Required. rect, ellipse or line |
fill, stroke |
Colors |
strokeWidth |
0 to 100 |
radius |
Corner radius, 0 to 1000 |
Guide: Shape.
Divider
A horizontal rule. Settings: thickness (0 to 100) and color. Guide: Divider.
Page number
| Setting | Meaning |
|---|---|
format |
Text with {n} for the page number and {total} for the page count. Empty means {n} |
In a header or footer the number is real in Print and PDF output. In the Screen preview and in the body it is shown as 1. Guide: Page number.
Layout components
Stack
Arranges children in a column. Settings: gap (millimetres) and align (start, center, end, stretch).
Row
Arranges children in a line. Settings: gap, align and justify (start, center, end, between).
Grid
Arranges children in columns. columns is a list of tracks. A track is a number of millimetres, auto, a percentage such as 30% or a fraction such as 1fr. gap is the spacing. Guide: Grid.
Section
Groups children and can override configuration for them with its config setting: direction, tokens and style. Guide: Section.
Fixed region
A box with a fixed size (w and h in millimetres) whose children are placed at exact positions with a frame. This is the only place where elements have coordinates. Guide: Fixed region.
Data components
Repeater
Repeats its children once for every item of a list.
| Setting | Meaning |
|---|---|
source |
Required. An expression that gives the list |
as |
A name for the item. It is stored for readability, paths inside use the current item |
children |
The elements repeated for each item |
empty |
Elements shown when the list is empty. It appears in Layers as its own Empty state region |
Inside a repeater a path starts at the current item. Use $parent for the outer data, $index for the position and $count for the number of items. Guide: Repeater.
Table
A table can show rows from the data, rows you type in, or both. Fixed rows come first, then the rows from the data source.
| Setting | Meaning |
|---|---|
source |
Optional. The list of data rows. A table without a source shows only its fixed rows |
columns |
Required. Each column has an id, a header, a cell expression, a width, an alignment, a visibility condition, a style and a headerStyle |
headerStyle |
Formatting of the whole header row |
rows |
Fixed body rows. Each row has cells with text or a calculation, a column span, an alignment and a style, and an optional row style |
footer |
Footer rows with text or calculated cells, formatted like fixed rows |
repeatHeader |
Repeat the header on every page |
zebra |
Alternate row shading |
emptyState |
What to show without rows: hide, message with text, or showHeader |
rowBreak |
avoid keeps a row on one page, auto lets it split |
Guides: Create a table, Table templates and size, Fixed rows and cells, Format a table, Columns, Footer rows.
Settings every element has
| Setting | Meaning |
|---|---|
id |
Unique identifier, created for you |
name |
Optional label shown in Layers |
style, styleRef, styleWhen |
Direct style, a named style, and conditional style rules |
when |
A condition. The element is hidden when it is false |
frame |
Position and size, used inside a fixed region |
break |
Page break control: before, after, inside |
Reusable components from the Library are inserted as component elements. They are not in the toolbox, see Library panel.