Skip to content

Project XML Attribute Protocol

Summary

This document lists the XML attribute protocol formally declared by packages/core/src/io/project-xml-protocol.ts. It describes only:

ScopeDescription
NodesCurrent package.xml and component.xml nodes formally included in the protocol
AttributesCanonical attribute names and aliases declared by the current protocol-layer attrs metadata
ContractCurrent formal implementation only, without historical compatibility, internal storage details, or future plans

This document does not cover:

Outside this documentDescription
children protocolStructures such as relation, gear*, item, and extension children; see the architecture and test contracts
containers protocoldisplayList container variants; see Project XML DisplayList Tag Alignment
Reader/writer implementationThis page describes the protocol, not its internal consumption path

Conventions

ColumnMeaning
AttributeCurrent canonical XML attribute name
AliasAlias accepted by the current protocol; blank means none
DescriptionNode semantics only, without internal model details

package.xml

packageDescription

AttributeAliasDescription
idPackage root identifier
hasFavoritesWhether the package contains favorite resources
compressPNGPackage image-compression switch
jpegQualityPackage JPEG quality

package_branch.xml > branchDescription

AttributeAliasDescription
No attributesRoot node of a branch resource list

packageDescription > publish

AttributeAliasDescription
namePackage publish name
pathPackage publish path
branchPathBranch publish path
packageCountPublished package-split count

Common resource nodes

These base attributes apply to resources under resources in both package.xml and package_branch.xml.

AttributeAliasDescription
idResource identifier
nameResource name
pathResource path
exportedWhether the resource participates in export
favoriteWhether the resource is a favorite

resources > image

AttributeAliasDescription
atlasImage texture-set mode
scaleScale mode
scale9gridNine-slice settings
widthResource width
heightResource height
gridTileTiled-grid settings
qualityOptionImage quality option
qualityCustom image quality; written when qualityOption="custom"
duplicatePaddingWhether edge pixels are duplicated
smoothingWhether smoothing is enabled

resources > movieclip

AttributeAliasDescription
atlasAnimation texture-set mode
smoothingWhether smoothing is enabled; defaults to true and is written only when false

resources > font

AttributeAliasDescription
textureFont texture resource
renderModeFont render mode
samplePointSizeFont sample point size

resources > misc

AttributeAliasDescription
No additional attributesUses only common resource attributes; the common name carries the resource filename

resources > spine

AttributeAliasDescription
widthSkeleton resource width
heightSkeleton resource height
requireComma-separated dependent resource IDs
atlasNamesComma-separated atlas names
anchorSkeleton anchor in x,y format

resources > dragonbones

AttributeAliasDescription
widthSkeleton resource width
heightSkeleton resource height
requireComma-separated dependent resource IDs
atlasNamesComma-separated atlas names
anchorSkeleton anchor in x,y format

component.xml

Current project write-back contract:

ItemDescription
Display-object xyNodes in displayList that support xy explicitly write their position; the default origin is written as xy="0,0"

Root <component>

AttributeAliasDescription
sizeRoot component size
pivotRoot component pivot
anchorRoot component anchor
marginRoot component margin
restrictSizeRoot component size constraints
overflowRoot component overflow mode
clipSoftnessSoft clipping edge
opaqueWhether the component is opaque
maskMask target
reversedMaskWhether the mask is reversed
hitTestHit-test resource
customDataCustom data
scrollScroll mode
scrollBarScrollbar display mode: default, visible, auto, or hidden
scrollBarFlagsScrollbar flags
scrollBarMarginScrollbar margin
scrollBarResScrollbar resource
ptrResPull-to-refresh resource
extentionRoot component extension type
bgColorBackground color
bgColorEnabledWhether the background color is enabled
idnumInternal number
initNameInitial name
remarkRemarks
pageControllerRoot page-controller name; must target a controller in this component
showSoundComponent show/enter sound resource
hideSoundComponent hide/exit sound resource
designImageDesign-reference image resource
designImageForTestWhether the design reference is visible in Test View
designImageAlphaDesign-image opacity; defaults to 50
designImageLayerDesign-image layer: 0 behind, 1 in front
designImageOffsetXDesign-image X offset
designImageOffsetYDesign-image Y offset

Root custom property <customProperty>

<customProperty> is a repeatable direct child of <component>.

AttributeAliasDescription
targetTarget object path inside the component
propertyIdExposed property type: 0 for text, 1 for icon
labelLabel displayed by the editor

Common display-object attributes

These attributes apply to every concrete display-list object. The tag-specific tables below add their own attributes or restate important fields. An omitted common attribute remains applicable.

AttributeAliasDescription
idObject identifier
nameObject name
relationRelation reference field
xyPosition
sizeSize
lockedWhether the object is locked
restrictSizeSize constraints
aspectAspect-ratio constraint
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
scaleScale
skewSkew in x,y format
rotationRotation
alphaOpacity
visibleWhether the object is visible
touchableWhether the object is touchable
grayedWhether the object is grayed out
tooltipsTooltip text
customDataCustom data
blendBlend mode
filterFilter type
filterDataFilter data

Child component instance <component>

AttributeAliasDescription
srcReferenced component resource
controllerInstance controller override
pageControllerInstance page controller
xyPosition
sizeSize
lockedWhether the instance is locked
restrictSizeSize constraints
aspectAspect-ratio constraint
pivotPivot
anchorAnchor
scaleScale
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the instance is visible
touchableWhether the instance is touchable
grayedWhether the instance is grayed out
tooltipsTooltip text
customDataCustom data
fileNameResource filename
pkgResource package identifier
filterFilter type
filterDataFilter data

<image>

AttributeAliasDescription
srcImage resource
colorColor
flipFlip mode
fillMethodFill method
fillOriginFill origin
fillClockwiseWhether filling is clockwise
fillAmountFill ratio
xyPosition
sizeSize
lockedWhether the image is locked
aspectAspect-ratio constraint
pivotPivot
anchorAnchor
scaleScale
skewSkew in x,y format
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the image is visible
touchableWhether the image is touchable
grayedWhether the image is grayed out
pkgResource package identifier
filterFilter type
filterDataFilter data

<graph>

AttributeAliasDescription
xyPosition
sizeSize
lockedWhether the graph is locked
restrictSizeSize constraints
pivotPivot
anchorAnchor
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the graph is visible
touchableWhether the graph is touchable
grayedWhether the graph is grayed out
skewSkew
typeGraph type
lineSizeLine width
lineColorLine color
fillColorFill color
cornerCorner radius
pointsVertex coordinates
sidesPolygon side count
startAngleStart angle
distancesVertex distances

<movieclip> / <jta>

AttributeAliasDescription
srcAnimation resource
playingWhether playback is active
frameFrame number
colorColor
xyPosition
sizeSize
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the object is visible
touchableWhether the object is touchable
grayedWhether the object is grayed out
fileNameResource filename
pkgResource package identifier
filterFilter type
filterDataFilter data

<loader>

AttributeAliasDescription
xyPosition
sizeSize
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
scaleScale
rotationRotation
alphaOpacity
visibleWhether the loader is visible
touchableWhether the loader is touchable
grayedWhether the loader is grayed out
urlLoad URL
alignHorizontal alignment
vAlignVertical alignment
fillFill mode
shrinkOnlyWhether only shrinking is allowed
autoSizeAutomatic sizing
useResizeWhether resize is used
colorColor
playingWhether playback is active
frameFrame number
fillMethodFill method
fillOriginFill origin
fillClockwiseWhether filling is clockwise
fillAmountFill ratio
clearOnPublishWhether the value is cleared on publish
filterFilter type
filterDataFilter data

<loader3d>

AttributeAliasDescription
xyPosition
sizeSize
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
rotationRotation
alphaOpacity
visibleWhether the loader is visible
touchableWhether the loader is touchable
grayedWhether the loader is grayed out
urlLoad URL
alignHorizontal alignment
vAlignVertical alignment
fillFill mode
shrinkOnlyWhether only shrinking is allowed
autoSizeAutomatic sizing
animationanimationNameAnimation name
skinskinNameSkin name
playingWhether playback is active
frameFrame number
loopWhether playback loops
colorColor
clearOnPublishWhether the value is cleared on publish

<text>

AttributeAliasDescription
xyPosition
sizeSize
restrictSizeSize constraints
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
customDataCustom data
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the text is visible
touchableWhether the text is touchable
grayedWhether the text is grayed out
fontFont
fontSizeFont size
colorColor
alignHorizontal alignment
vAlignVertical alignment
autoSizeAutomatic sizing
singleLineSingle-line mode
textText content
inputWhether the text is editable input
ubbWhether UBB is enabled
leadingLine spacing
letterSpacingLetter spacing
underlineUnderline
italicItalic
boldBold
strikethroughStrikethrough
strokeColorStroke color
strokeSizeStroke width
shadowColorShadow color
shadowOffsetShadow offset
autoClearTextWhether text is cleared automatically
demoTextSample text
faceDilateFace dilation
outlineSoftnessOutline softness
underlaySoftnessUnderlay softness
varsTemplate-variable switch
promptpromptTextInput prompt
maxLengthMaximum length
restrictInput restriction
passwordPassword mode
keyboardTypeKeyboard type

<inputtext>

AttributeAliasDescription
xyPosition
sizeSize
restrictSizeSize constraints
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
customDataCustom data
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the text is visible
touchableWhether the text is touchable
grayedWhether the text is grayed out
fontFont
fontSizeFont size
colorColor
alignHorizontal alignment
vAlignVertical alignment
autoSizeAutomatic sizing
singleLineSingle-line mode
textText content
inputWhether the text is editable input
ubbWhether UBB is enabled
leadingLine spacing
letterSpacingLetter spacing
underlineUnderline
italicItalic
boldBold
strikethroughStrikethrough
strokeColorStroke color
strokeSizeStroke width
shadowColorShadow color
shadowOffsetShadow offset
autoClearTextWhether text is cleared automatically
demoTextSample text
faceDilateFace dilation
outlineSoftnessOutline softness
underlaySoftnessUnderlay softness
varsTemplate-variable switch
promptpromptTextInput prompt
maxLengthMaximum length
restrictInput restriction
passwordPassword mode
keyboardTypeKeyboard type

<richtext>

AttributeAliasDescription
xyPosition
sizeSize
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
customDataCustom data
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the text is visible
touchableWhether the text is touchable
grayedWhether the text is grayed out
fontFont
fontSizeFont size
colorColor
alignHorizontal alignment
vAlignVertical alignment
autoSizeAutomatic sizing
singleLineSingle-line mode
textText content
ubbWhether UBB is enabled
leadingLine spacing
letterSpacingLetter spacing
underlineUnderline
italicItalic
boldBold
strikethroughStrikethrough
strokeColorStroke color
strokeSizeStroke width
shadowColorShadow color
shadowOffsetShadow offset
autoClearTextWhether text is cleared automatically
restrictSizeSize constraints
outlineSoftnessOutline softness
underlaySoftnessUnderlay softness

<group>

AttributeAliasDescription
xyPosition
sizeSize
lockedWhether the group is locked
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the group is visible
touchableWhether the group is touchable
grayedWhether the group is grayed out
layoutLayout mode
lineGapRow gap
colGapcolumnGapColumn gap
advancedWhether advanced grouping is enabled
excludeInvisiblesWhether invisible objects are excluded
autoSizeDisabledWhether automatic sizing is disabled
mainGridIndexMain-grid index

<list> / tree list

AttributeAliasDescription
srcList resource
layoutLayout mode
alignHorizontal alignment
vAlignVertical alignment
lineGapRow gap
colGapcolumnGapColumn gap
lineItemCountItems per row for flow_hz, per column for flow_vt, or columns per page for pagination
lineItemCount2Rows per page for pagination
autoItemSizeautoResizeItemWhether item size is adjusted automatically; defaults to true for single column/row and false for flow/pagination
renderOrderChild render order: ascent, descent, or arch
apexApex child index when renderOrder="arch"
selectionModeSelection mode
selectionControllerSelection controller
defaultItemDefault item resource
pageControllerPage controller
controllerController override
overflowOverflow mode
scrollScroll mode
scrollBarScrollbar display mode: default, visible, auto, or hidden
scrollBarFlagsScrollbar flags
scrollBarMarginScrollbar margin
scrollBarResScrollbar resource
ptrResPull-to-refresh resource
marginMargin
clipSoftnessSoft clipping edge
treeViewWhether tree mode is enabled
indentTree indentation
clickToExpandClick-to-expand behavior: 0=none, 1=single click, 2=double click
autoClearItemsWhether items are cleared automatically
scrollItemToViewOnClickWhether clicking an item scrolls it into view
foldInvisibleItemsWhether invisible items collapse during layout
xyPosition
sizeSize
pivotPivot
anchorWhether the pivot is used as the coordinate anchor
groupOwning group
rotationRotation
alphaOpacity
visibleWhether the list is visible
touchableWhether the list is touchable
grayedWhether the list is grayed out

Extension child-node protocol

<Button>

AttributeAliasDescription
modeButton mode
soundClick sound
volumeVolume percentage (0100)
downEffectPressed effect: none, dark, or scale
downEffectValuePressed-effect value
titleTitle
selectedTitleSelected title
iconIcon
selectedIconSelected icon
titleColorTitle color
titleFontSizeTitle font size
controllerAssociated controller
pageAssociated page
checkedWhether the button is checked

<Label>

AttributeAliasDescription
titleTitle
iconIcon
titleColorTitle color
titleFontSizeTitle font size
promptPrompt text
soundClick-sound resource
volumeVolume percentage (0100)

<ComboBox>

AttributeAliasDescription
dropdownDropdown component resource
titleTitle
iconIcon
titleColorTitle color
directionPopup direction: auto, up, or down
soundClick-sound resource
volumeVolume percentage (0100)
visibleItemCountNumber of visible items
selectionControllerSelection controller
autoClearItemsWhether items are cleared automatically

<ProgressBar>

AttributeAliasDescription
titleTypeTitle type
reverseWhether direction is reversed
valueCurrent value
maxMaximum value
minMinimum value
soundSound resource
volumeVolume percentage (0100)

<Slider>

AttributeAliasDescription
titleTypeTitle type
reverseWhether direction is reversed
wholeNumbersWhether values use integer steps
changeOnClickWhether clicking changes the value
valueCurrent value
maxMaximum value
minMinimum value

<ScrollBar>

AttributeAliasDescription
fixedGripSizeWhether the grip has a fixed size

Structural-node attributes

<relation>

AttributeAliasDescription
targetTarget object
sidePairRelation-side pair

<gear*>

AttributeAliasDescription
controllerController
pagesPage set
valuesValue set
defaultDefault value
tweenWhether tweening is enabled
positionsInPercentWhether positions use percentages
conditionGear condition
easeEasing type
durationDuration
delayTween delay in seconds, default 0

<controller>

AttributeAliasDescription
nameController name
pagesPage set
selectedCurrently selected page
aliasEditor-facing remark name, used as the display label when exported as a component property
autoRadioGroupDepthWhether controlled radio buttons automatically adjust their display depth
exportedWhether the controller is exported as a component property
homePageTypeHome-page strategy: default, specific, branch, or variable
homePagePage ID for specific, or project-variable key for variable

<action>

AttributeAliasDescription
typeAction type
fromPageSource page
toPageTarget page
transitionTransition name
repeatRepeat count
delayDelay
stopOnExitWhether to stop on exit
objectIdTarget object
controllerController name
targetPageTarget page name

<transition>

AttributeAliasDescription
nameTransition name
autoPlayWhether playback starts automatically
autoPlayRepeatautoPlayTimesAutomatic-play repeat count
autoPlayDelayAutomatic-play delay
optionsOptions
frameRateFrame rate

<transition><item>

AttributeAliasDescription
timeTime point
targetTarget object
tweenWhether tweening is enabled
durationDuration
repeatRepeat count
yoyoWhether playback alternates direction
labelLabel
label2Secondary label
pathMotion path for XY tweening
customEaseCustom easing-curve data used when ease="Custom"; independent of the path motion path
easeEasing type; Custom selects customEase
typeItem type
valueValue
startValueStart value
endValueEnd value

<list><item>

AttributeAliasDescription
titleTitle
iconIcon
urlLinked resource
nameName
selectedTitleSelected title
selectedIconSelected icon
levelHierarchy level
isFolderWhether the item is a folder
controllersController overrides

<component><property> / <list><item><property>

AttributeAliasDescription
targetOverridden object identifier; must not be empty
propertyIdNon-negative integer property number
valueOverride value; an empty string is valid

property children under the same host are preserved in XML order.

<ComboBox><item>

AttributeAliasDescription
titleTitle
valueValue
iconIcon

Maintenance requirements

ChangeRequirement
Add an XML attributeUpdate this document in the same change
Add an aliasUpdate the canonical/alias mapping together
Change tag naming or displayList variantsUpdate Project XML DisplayList Tag Alignment together
Protocol-document boundaryDescribe only the XML protocol, without internal storage or implementation-alignment details

MIT Licensed