Properties for configuring a grid layout, compatible with CSS Grid Layout.
The GridProperties struct allows you to define a grid layout similar to CSS Grid.
- rows: Number of grid rows (default: 1).
- columns: Number of grid columns (default: 1).
- autoRows: Defines the height of each row, similar to 'grid-template-rows' in CSS.
- autoColumns: Defines the width of each column, similar to 'grid-template-columns' in CSS.
- rowGap: Space between rows, equivalent to 'row-gap' in CSS.
- columnGap: Space between columns, equivalent to 'column-gap' in CSS.
- alignItems: Controls alignment of items within their grid area (CSS: 'align-items'). Options: Start, Center, End, Stretch.
- justifyItems: Controls horizontal alignment of items within their grid area (CSS: 'justify-items'). Options: Start, Center, End, Stretch.
- alignContent: Controls vertical alignment of the grid as a whole (CSS: 'align-content'). Options: Start, Center, End, Stretch, SpaceBetween, SpaceAround.
- justifyContent: Controls horizontal alignment of the grid as a whole (CSS: 'justify-content'). Options: Start, Center, End, Stretch, SpaceBetween, SpaceAround.
gridAreas: Optional. Defines the grid area (row, column, rowSpan, colSpan) for each child/view. If provided, each child can span multiple rows/columns, similar to CSS grid-area. If not provided, each child is placed in a single cell by default.
Note: justify-content is ignored when grid areas are used and the grid tracks exactly fit the content (no extra free space). If grid areas are used and the grid is smaller than the container, justify-content can affect the grid's position within the container.
This struct is designed to be compatible with the CSS Grid Layout specification: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_grid_layout