Design Principles
This page records the layout rules Rezi follows in the current alpha line.
This page records the layout rules Rezi follows in the current alpha line.
Canonical layout mechanisms
Use the first mechanism that fits the need:
- Fixed cells:
width: 20 - Flex distribution:
flex: 1 - Grid placement:
ui.grid({ columns: ... }) - Helper constraints (preferred) or
expr("...")for derived relationships fluid(min, max)for smooth scaling
Constraint policy
- Helper-first constraints are the mainstream path:
visibilityConstraints,widthConstraints,heightConstraints,spaceConstraints,groupConstraints,conditionalConstraints
- Raw
expr("...")is the escape hatch for custom rules. %size strings and responsive-map layout constraints ({ sm, md, ... }) are not part of the public API.grid.columnsacceptsnumber | stringin alpha;columns: expr(...)is invalid.- Layout-driven visibility uses
display: ...constraints; business logic visibility usesshow(...)/when(...)/maybe(...)/match(...).
Banned patterns (high signal)
- Manual
Math.floor/ceil/min/maxto compute widgetwidth/heightin view functions - Threading viewport size through application state for layout decisions
%layout size strings- responsive-map layout constraints for sizing/visibility
For detailed examples, see docs/guide/constraints.md and docs/guide/layout-decision-tree.md.