Skip to content

Properties

Generated by pnpm docs:reference from packages/core/src/properties/UiProperty.ts. Do not edit this page; edit the registry, or the notes in apps/docs/src/reference/property-notes.ts.

There are 140 properties. Every element accepts every one of them, because a property is a slot on a node rather than something a particular element declares. A property nothing sets costs nothing: it is not stored, and it resolves to the default below.

Default is what the property resolves to when no ancestor provides it and nothing sets it. unset means exactly that: the property holds no value, and whatever reads it decides what to do, which for a length usually means sizing from content. A default printed as plain words rather than in code is one whose real value is an object, described here because printing it would not help.

Inherited means the value is looked up through the environment rather than stopping at the node. 13 properties inherit, and they are all text style: set fontSize on a container and every text node below reads it. The properties in Environment are the other side of that, the ones that provide a value for a subtree.

Invalidates is what changing the value marks dirty, which decides how much work the next frame does. Paint repaints the node. Layout re-runs layout for the box and whatever depends on it. Content remeasures text. Transform moves what is already painted. Semantics republishes the accessibility record. Properties marks the value changed without scheduling any of those, for something the input or paint layer reads on demand. None means the runtime does no work at all, and something else reads the value when it needs it.

The groups are editorial. Within a group the order is the order the registry declares them in.

Size

What a box asks for. Nothing here is a promise: a min or a max, a parent, or the content can all overrule it.

PropertyDefaultInheritedInvalidatesWhat it does
widthunsetnoLayoutRequested width, as a number of pixels or a length.
heightunsetnoLayoutRequested height, as a number of pixels or a length.
minWidthunsetnoLayoutFloor on the width, applied after everything else has had its say.
maxWidthunsetnoLayoutCeiling on the width. Beats width, loses to minWidth.
minHeightunsetnoLayoutFloor on the height.
maxHeightunsetnoLayoutCeiling on the height.
aspectRatiounsetnoLayoutWidth divided by height. Fills in whichever of the two is not otherwise decided.

Spacing

Space inside the box, space outside it, and space between children.

PropertyDefaultInheritedInvalidatesWhat it does
paddingunsetnoLayoutSpace inside the border on all four sides. A number, never a tuple.
paddingXunsetnoLayoutSpace inside the border, left and right. The idiom, over a pair of sides.
paddingYunsetnoLayoutSpace inside the border, top and bottom. The idiom, over a pair of sides.
paddingTopunsetnoLayoutOverrides paddingY on the top edge. For one edge, not for an axis.
paddingRightunsetnoLayoutOverrides paddingX on the right edge. For one edge, not for an axis.
paddingBottomunsetnoLayoutOverrides paddingY on the bottom edge. For one edge, not for an axis.
paddingLeftunsetnoLayoutOverrides paddingX on the left edge. For one edge, not for an axis.
paddingStartunsetnoLayoutSpace inside the border on the edge the reading starts at. The idiom for one horizontal edge.
paddingEndunsetnoLayoutSpace inside the border on the edge the reading ends at. The idiom for one horizontal edge.
marginunsetnoLayoutSpace outside the box on all four sides. Margins do not collapse.
marginXunsetnoLayoutSpace outside the box, left and right. The idiom, over a pair of sides.
marginYunsetnoLayoutSpace outside the box, top and bottom. The idiom, over a pair of sides.
marginTopunsetnoLayoutOverrides marginY on the top edge. For one edge, not for an axis.
marginRightunsetnoLayoutOverrides marginX on the right edge. For one edge, not for an axis.
marginBottomunsetnoLayoutOverrides marginY on the bottom edge. For one edge, not for an axis.
marginLeftunsetnoLayoutOverrides marginX on the left edge. For one edge, not for an axis.
marginStartunsetnoLayoutSpace outside the box on the edge the reading starts at. The idiom for one horizontal edge.
marginEndunsetnoLayoutSpace outside the box on the edge the reading ends at. The idiom for one horizontal edge.
gapunsetnoLayoutSpace between children, on both axes.
rowGapunsetnoLayoutOverrides gap between rows.
columnGapunsetnoLayoutOverrides gap between columns.

Flex

How a row or a column arranges its children, and how a child answers back.

PropertyDefaultInheritedInvalidatesWhat it does
flexunsetnoLayoutThe CSS shorthand: flex={n} is grow n, shrink 1, basis 0.
flexWrapunsetnoLayoutWhether children that do not fit start a new line.
alignContentunsetnoLayoutHow a wrapping container distributes its lines on the cross axis, and a grid its row tracks.
layoutunsetnoLayoutA layout the application wrote itself, which measures and places this node's children.
layoutDataunsetnoLayoutA value carried to the custom layout that arranges this node.
flexGrowunsetnoLayoutShare of the space left over that this child takes.
flexShrinkunsetnoLayoutShare of any shortfall this child gives up. Defaults to 1 in a flex container.
flexBasisunsetnoLayoutThe size grow and shrink start from, before either applies.
xunsetnoLayoutAlignment of children along the x axis. Axis-relative, so it does not flip with direction.
yunsetnoLayoutAlignment of children along the y axis. Axis-relative, so it does not flip with direction.
selfXunsetnoLayoutOne child overriding the x alignment its parent set.
selfYunsetnoLayoutOne child overriding the y alignment its parent set.
directionunsetnoLayoutWhich way a flex or scroll container runs.

Grid

Track definitions on the container, placement on the item.

PropertyDefaultInheritedInvalidatesWhat it does
columnsunsetnoLayoutThe column tracks, as a list of sizes.
rowsunsetnoLayoutThe row tracks, as a list of sizes.
autoColumnsunsetnoLayoutSize for columns the grid creates beyond the declared ones.
autoRowsunsetnoLayoutSize for rows the grid creates beyond the declared ones.
subgridunsetnoLayoutA nested grid taking its column tracks from the span it occupies in its parent. Column axis only.
autoFlowunsetnoLayoutWhich axis unplaced items fill first.
justifyContentunsetnoLayoutHow the column tracks are distributed when they do not fill the container.
columnunsetnoLayoutThe column line this item starts at, counting from 1.
columnSpanunsetnoLayoutHow many columns the item covers.
rowunsetnoLayoutThe row line this item starts at, counting from 1.
rowSpanunsetnoLayoutHow many rows the item covers.

Position

Taking a box out of flow, and putting it somewhere specific instead.

PropertyDefaultInheritedInvalidatesWhat it does
positionunsetnoLayoutOne of static, relative, absolute, sticky. Anything but static makes a containing block.
topunsetnoLayoutOffset from the top edge of the containing block.
rightunsetnoLayoutOffset from the right edge.
bottomunsetnoLayoutOffset from the bottom edge.
leftunsetnoLayoutOffset from the left edge.
zIndexunsetnoLayoutPaint and hit-test order among siblings; higher paints later and is hit first.
liftunsetnoLayoutPaints this node above the tree and outside every clip its ancestors impose, keeping their transforms and scrolling. For a shared element morphing into something that clips; see sharedElement.
liftBoundaryunsetnoLayoutHow far a lifted descendant rises: to the end of this node rather than the end of the frame. Presence marks every layer with it, so a lift is held to its own screen.
anchorunsetnoLayoutThe node an absolute box is placed beside. Flips and shifts to stay inside its containing block.
placementunsetnoLayoutWhich side of the anchor to sit on, and how to align along it.
anchorOffsetunsetnoLayoutGap between the anchor and the anchored box.
insetunsetnoLayoutShorthand for top, right, bottom and left at once.

Overflow and scrolling

Clipping, scroll containers, and what a wheel does when it reaches the end.

PropertyDefaultInheritedInvalidatesWhat it does
overflowunsetnoPaint, Layoutvisible, hidden, or scroll and auto, which make the box a scroll container.
scrollXunsetnoTransformCurrent horizontal scroll offset. Readable and writable.
scrollBehaviorunsetnoNoneWhether a wheel moves this container at once or animates it. Read by input, not by layout.
scrollYunsetnoTransformCurrent vertical scroll offset. Readable and writable.
overscrollBehaviorunsetnoNoneWhat happens to a wheel delta this node cannot use: chain it to an ancestor, or keep it.

Paint

Fills, borders, shadows and everything else that changes pixels without changing boxes.

PropertyDefaultInheritedInvalidatesWhat it does
backgroundColorunsetnoPaintFill behind the content. Takes a theme token as well as a colour.
backgroundGradientunsetnoPaintA gradient over the background colour and under the image. Built with linearGradient or radialGradient.
borderColorblacknoPaintColour of the border, drawn inside the box.
borderWidthunsetnoPaintThickness of that border, in pixels.
borderRadiusno roundingnoPaintCorner rounding: one number, four, or a name in the theme's shape scale (borderRadius="medium"), resolved at paint against the theme the element is under. Clips the background, the image and overflow: hidden.
opacity1noPaintApplies to the whole subtree, not just this node.
boxShadowsnonenoPaintShadows behind the box, painted in order.
visibletruenoPaint, SemanticsHides the box and its subtree without taking it out of layout.
transformunsetnoPaint, TransformTranslation, scale and rotation applied at paint time. Layout does not see it.
paintunsetnoPaint, LayoutA painter given a drawing surface, the resolved box and the device scale, with the inputs it reads. Repainted when those change and not otherwise.
pathunsetnoPaintA static vector shape, with its own fill rule, stroke, dash, caps and joins.
clipPathunsetnoPaintClips this node to a path, in the same vocabulary path takes.
blurunsetnoPaintBlurs a painted node's own picture, in pixels. Not a backdrop blur.

Text

The text style properties are the inherited ones. Set them on a container and everything below reads them.

PropertyDefaultInheritedInvalidatesWhat it does
colorblackyesPaintText colour. Inherited, and a theme token resolves against the theme in scope.
fontFamilysans-serifyesPaint, LayoutFont stack, as a CSS family list.
fontSize14yesPaint, LayoutSize in pixels.
fontWeightnormalyesPaint, LayoutA number, a numeric string, or a CSS keyword.
lineHeight16.8yesPaint, LayoutLine box height in pixels. The default is 1.2 times the default size.
letterSpacing0yesPaint, LayoutExtra space between characters, in pixels.
textAlignstartyesPaintHow lines sit within the text box.
textDirectionltryesPaintBase direction for bidirectional text.
fontStylenormalyesPaint, LayoutUpright or sloped: normal, italic or oblique.
fontStretchnormalyesPaint, LayoutThe width axis, as CSS keywords. Reaches a variable font's wdth.
fontVariantnormalyesPaint, LayoutThe one variant a canvas font string carries: normal or small-caps.
fontKerningautoyesPaint, LayoutWhether the shaper applies the font's kerning pairs.
textDecorationnoneyesPaintLines drawn with the text: underline, line-through, or both. Paint only.
spansunsetnoContent, Layout, SemanticsThe paragraph as runs of { text, style } instead of one string. Set instead of text: the runs concatenated are the text, so offsets mean the same thing either way.
verticalAlignunsetnoPaintHow a text run sits against the baseline of its line.
textWrapunsetnoPaint, LayoutHow text breaks into lines: word, char, or none.
maxLinesunsetnoPaint, LayoutLines kept before the rest is dropped. Pairs with textOverflow.
textOverflowunsetnoPaint, LayoutWhat happens to a line that does not fit: clip or ellipsis.
textunsetnoContent, Layout, SemanticsThe string a text node draws. Changing it remeasures and relayouts.

Editing

The properties an editable node adds. Set by TextInput and TextArea; usable directly.

PropertyDefaultInheritedInvalidatesWhat it does
valueunsetnoContent, Layout, SemanticsThe text of an editable node. Write the reported value back to get a controlled field.
placeholderunsetnoPaint, LayoutShown while the value is empty.
multilineunsetnoPropertiesWhether Enter inserts a newline or is left for the app.
readOnlyunsetnoPropertiesSelectable and focusable, but not editable.
caretColorunsetnoPaintColour of the caret. Falls back to the text colour.
selectionColorunsetnoPaintFill behind selected text.
matchColorunsetnoPaintFill behind a find match.
placeholderColorunsetnoPaintColour of the placeholder text.
editorunsetnoPropertiesThe editable text model backing this node, when the app supplies its own.

Interaction

Whether a node can be hit, focused, selected, or used at all.

PropertyDefaultInheritedInvalidatesWhat it does
cursorunsetnoPropertiesCSS cursor shown over this node. Resolved on hover and applied to the canvas by the shell.
selectableunsetnoPropertiesWhether the pointer may select text in this subtree. Read up the ancestor chain, like user-select.
pointerEventsunsetnoPropertiesWhether the node takes pointer input, or lets it through to what is behind.
focusableunsetnoPropertiesWhether focus can land here, by tab or by click.
disabledunsetnoProperties, SemanticsBlocks input and publishes the disabled state to the mirror.
hitTestableunsetnoPropertiesWhether hit testing considers this node at all.
visualStatenormalnoPaintHover, press, focus, disabled. Written by interactive and read by whatever paints.

Semantics

What the node publishes to the accessibility mirror, since a canvas has no DOM to read.

PropertyDefaultInheritedInvalidatesWhat it does
roleunsetnoSemanticsWhat the node is, as far as assistive technology is concerned. Validated on write.
labelunsetnoSemanticsThe accessible name.
descriptionunsetnoSemanticsLonger detail, read after the name.
liveunsetnoSemanticsA live region: polite or assertive. Its text is announced when it changes.
statesunsetnoSemanticsChecked, expanded, busy, and the rest. Validated on write.
valueNowunsetnoSemanticsCurrent value of a range widget.
valueMinunsetnoSemanticsLowest value that range accepts.
valueMaxunsetnoSemanticsHighest value that range accepts.
valueTextunsetnoSemanticsA human reading of the value, where the number alone would not do.
posInSetunsetnoSemanticsWhich item in a set this is, counting from 1.
setSizeunsetnoSemanticsHow many items the set holds, including any not built yet.
levelunsetnoSemanticsHow deep a tree item sits, 1 for a root. A tree is a flat list of rows, so nothing else carries this.

Media

Bitmaps and video frames, both resolved on the shell thread and drawn inside the box.

PropertyDefaultInheritedInvalidatesWhat it does
imageunsetnoPaintA decoded bitmap drawn inside the box, clipped by borderRadius.
videounsetnoPaintA video surface drawn where an image would be, under the same fit and clip.
objectFitunsetnoPaintHow that bitmap or surface fills the box: fill, cover, contain, none.

Virtualization

What a virtualized container writes on its rows so the runtime can reason about the ones it cannot see.

PropertyDefaultInheritedInvalidatesWhat it does
virtualIndexunsetnoPropertiesWhich item in the full list this mounted row is.
virtualLeadunsetnoPropertiesSpace standing in for the rows above the window.
virtualWindowunsetnoPropertiesThe range currently built, and the estimate for everything outside it.

Environment

Values provided at one node and inherited by everything under it.

PropertyDefaultInheritedInvalidatesWhat it does
themeunsetnoEnvironmentProvides a palette and a type scale to this subtree.
textStyleunsetnoEnvironmentProvides one step of the type scale as the inherited text style.
contentColorunsetnoEnvironmentProvides the colour that content on this surface should use.
containerSizeunsetnoEnvironmentDeclares this node a size query container and provides its content size to the subtree.
insetsunsetnoEnvironmentProvides the registry a floating bar publishes into and a page reads.

Next

The API index is the other generated page: the names an application imports, rather than the properties it sets.