The layout priority. Higher values receive preference for available space. Default is
0.Support
Usage
Prioritizing one text over another
When two texts compete for space in an HStack, the one with higher layout priority gets its full width before the other.Preventing truncation
Notes
- Layout priority only matters when sibling components compete for limited space within a parent container (e.g.,
HStack,VStack). - All components default to a priority of
0. A component with priority1will be offered its ideal size before components with priority0. - Negative values are valid and will cause the component to shrink before siblings.