Gap

Define gutters between rows and columns.

The gap property defines the size of the gap (gutter) between rows and between columns in Flexbox and Grid layouts. It is a shorthand for row-gap and column-gap in CSS, represented as a Size<LengthPercentage> in Taffy.

Values

gap takes a Size object with width (column gap) and height (row gap), usually in pixels or percent.

PropertyDescription
widthSpace between items in a row (Column Gap).
heightSpace between lines/rows (Row Gap).

Example

Loading Preview…

Next Steps

© 2026 ByteLand Technology Limited