Styling

Comprehensive guide to Taffy's styling properties.

Taffy's styling API is modeled after CSS. Below is a categorized list of all supported properties.

Layout Mode

Core properties that define how a node behaves.

PropertyDescription
displayFlex (default), Grid, or None.
positionRelative (flow) or Absolute (overlay).
overflowVisible, Hidden, or Scroll.
insettop, bottom, left, right for positioning.

Sizing & Spacing

Control dimensions and spacing.

PropertyDescription
size / minSize / maxSizeWidth and height control.
aspectRatioRatio between width and height.
marginOuter spacing.
paddingInner spacing.
borderBorder width (space only).
gapSpacing between Flex/Grid items.

Flexbox Layout

Properties for 1D layouts.

PropertyDescription
flexDirectionRow or Column direction.
flexWrapWrap or NoWrap.
flexBasisInitial main size.
flexGrowGrowth factor.
flexShrinkShrink factor.
justifyContentMain-axis alignment.
alignItemsDefault cross-axis alignment.
alignSelfOverride alignment for item.
alignContentAlign wrapping lines.

Grid Layout

Properties for 2D layouts.

PropertyDescription
gridTemplateDefine columns and rows.
gridColumnPlace items in columns.
gridRowPlace items in rows.
gridAutoFlowAuto-placement algorithm.

© 2026 ByteLand Technology Limited