Skip to content

XML tag reference ​

The compiler accepts exactly these 57 tag names, plus any custom tag you register with registerWidget. Any other name is a compile error (unknown component type).

Static attributes are read once, when the widget is built (the factory reads them). Settable attributes go through a setter, so they work both as plain values and as bind: expressions. A static-only attribute given as bind: is ignored.

Common attributes ​

Every tag takes these (plus name, or id as an alias, which names the component):

x, y, enabled, visible, layout, spacing, gridColumns, flow-row-gap, variant, padding, margin, zIndex, align, justify, minWidth, minHeight, maxWidth, maxHeight, fill, grow, width, height.

See Attributes and values for what each one does.

Tags ​

TagStatic (build time)Settable (also bindable)Events (on:)
PanelalignItems, background, border, cornerRadius, justifyContent, sizeclick
Labelfontalign, bold, color, fontSize, italic, size, text, wrapWidthclick
Buttonfont, fontSizeautoSize, size, textclick
IconButtonicon, sizeclick
Togglevaluechange, click
Checkboxfont, fontSizechecked, textchange, click
TextInputfontSizemaxLength, placeholder, size, value, widthchange, submit, blur, click
TextAreafontSizemaxLength, rows, size, valueclick
Sliderorientation, range, size, step, valuechange, click
ScrollBarorientation, size, valueclick
ProgressBarshowLabelfillColor, range, size, valueclick
MeterBarrange, size, valueclick
ListitemHeight, selected, sizechange, select, click
TileListtileHeight, tileWidthcolumns, selected, sizechange, select, click
TreeListitemHeightleafOnlySelection, selectable, sizeclick
TabBarfontSizeoverflowMode, selected, sizechange, click
ScrollPanelbackground, scrollX, scrollY, sizeclick
Windowfont, fontSizecloseable, enterResult, escResult, minHeight, minWidth, modal, movable, resizable, size, titleclose, click
RichTextfontSizealign, color, headingScale, markup, wrapWidthlinkClick, click
Radiocolumns, selected, verticalFirstchange, click
Componentclick
NumberStepperfontSizedecimals, max, min, pageStep, size, step, valuechange, click
ToggleButtonBarbuttons, fontSizeselected, sizechange, click
AnchorLayoutbackground, border, cornerRadius, sizeclick
TwoColumnLayoutbackground, border, columnRatio, gap, leftAlign, leftWidth, rightAlign, rowSpacing, sizeclick
Tabclick
Spacersizeclick
SelectfontSizeoptions, selected, sizechange, click
OptionRotatorfontSizeoptions, selected, size, wrapchange, click
RadioButtonclick
DragHandleaxis, gripStyle, max, min, sizeclick
InputFieldfontSizelabel, labelPosition, maxLength, placeholder, required, size, validationMessage, validationState, value, widthchange, submit, blur, click
SearchBoxfontSizedebounceMs, minQueryLength, placeholder, showClearButton, showSearchIcon, size, value, widthchange, submit, clear, blur, click
Badgefont, fontSizecount, dotMode, kind, maxCount, size, textclick
StatWebfontSizeeditable, fillEnabled, sizechange, click
NavDraweranchor, pinned, size, widthclose, click
ImageCroppershowGrid, sizecrop, click
ColorPickerfontSizecolor, defaultMode, showAlpha, sizechange, commit, click
ToolBarorientation, overflowMode, size, wrapclick
SortableTreeListfontSizeallowCrossLevel, allowReparent, selected, sizechange, select, reorder, click
Imagealpha, atlas, cornerRadius, scaleMode, size, srcclick
AnimatedImageatlas, cornerRadius, fps, gif, playMode, sizeclick
CalendarSelectorfont, fontSizedate, popupMode, sizeclick
TimePickerfontSizeformat, showSeconds, size, timechange, click
KeybindInputfont, fontSizesizecapture, click
MaskedInputfontSizemask, maskPlaceholder, maxLength, placeholder, rawValue, size, value, widthchange, submit, blur, click
SortableListitemHeightdragEnabled, handleSide, keyboardReorderEnabled, selected, showHandles, sizechange, select, reorder, click
Tagfont, fontSizekind, removable, selectable, selected, size, textremove, toggle, click
TagBarfont, fontSizeplaceholder, sizeclick
AccordionfontSizeanimated, exclusive, expanded, sizetoggle, click
DataTableheaderHeight, onSortScroll, rowClickSelects, rowHeight, scrollMode, selectionMode, showColumnDividers, showHeader, showRowDividers, showScrollBar, zebraStripingclick
Columnclick
Sectionclick
Tooltipanchor, clampToScreen, fadeIn, fadeOut, hideDelay, showDelay, size, textclick
PopovertitlecontentSize, preferredSide, showCloseButton, sizeclose, open, click
GradientEditorfontSizeshowModeSelector, sizechange, click
MenuBarfontSizesizeclick

click on a tag other than Button and IconButton is wired to the component's activate callback. Any other event name that the tag does not handle goes to Component.setOnEvent(name, handler), so a custom widget can fire it.

Pseudo-elements ​

  • <Column>: Only inside <DataTable>: adds a column. Attributes: key, header, tooltip, weight, sortable, searchable, fixedWidth, sortType (numeric, custom), textAlign (center, right), clipMode (mask).
  • <RadioButton>: Only inside <Radio>: adds one option. Attribute: label.
  • <Section>: Only inside <Accordion>: adds a section whose children are stacked in a vbox panel. Attributes: id, label.
  • <Tab>: Inside <TabBar>: adds a tab page. Attribute: label, plus any common attribute (layout, spacing, padding...) applied to the page. Its children go into the page.
  • <Theme>: a JSON theme patch, not a component. See Variants and inline themes.

Configuring the rest in code ​

An attribute that is not in a tag's row has no effect in XML. Give the element a name and configure it in code after instantiate (for example list items, menu entries and table rows, which have no XML form).