AlignItems

Cross-axis alignment enumeration for all children

Defines the default alignment for all flex/grid items along the cross axis. This corresponds to the CSS align-items property.

Example

import { Style, AlignItems } from "taffy-layout"; const style = new Style(); style.alignItems = AlignItems.Center; // Center items on cross axis style.alignItems = AlignItems.Stretch; // Stretch items to fill container

Enumeration Members

Enumeration MemberValueDescription
Baseline5Items aligned to their text baselines
Center4Items centered along the cross axis
End1Items aligned to the end of the cross axis
FlexEnd3Items aligned to the end of the flex container
FlexStart2Items aligned to the start of the flex container
SafeCenter13Safe center alignment that avoids start-edge overflow
SafeEnd10Safe end alignment that avoids start-edge overflow
SafeFlexEnd12Safe flex-end alignment that avoids start-edge overflow
SafeFlexStart11Safe flex-start alignment that avoids start-edge overflow
SafeSelfEnd15Safe self-end alignment that avoids start-edge overflow
SafeSelfStart14Safe self-start alignment that avoids start-edge overflow
SafeStart9Safe start alignment that avoids start-edge overflow
SelfEnd8Items aligned to the end edge determined by the item's own direction
SelfStart7Items aligned to the start edge determined by the item's own direction
Start0Items aligned to the start of the cross axis
Stretch6Items stretched to fill the container

© 2026 ByteLand Technology Limited