The 2D layer · type
UiSize
How big a node asks to be along one axis.
Explained in Sprites and tilemaps.
type UiSize = number | 'fit' | 'grow'import type { UiSize } from '@driftengine/ui2d';In depth
A number is that many units. fit is whatever its own contents come to. grow takes an equal
share of what is left along the parent's main axis, and behaves as fit across it.
Three cases rather than a percentage or a flex factor, and the omission is deliberate: a
percentage of a parent that is itself fit is a cycle, and a weighted grow is a fourth case
whose only caller so far would be a two-to-one split that two nested nodes already express.