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 Member | Value | Description |
|---|---|---|
Baseline | 5 | Items aligned to their text baselines |
Center | 4 | Items centered along the cross axis |
End | 1 | Items aligned to the end of the cross axis |
FlexEnd | 3 | Items aligned to the end of the flex container |
FlexStart | 2 | Items aligned to the start of the flex container |
SafeCenter | 13 | Safe center alignment that avoids start-edge overflow |
SafeEnd | 10 | Safe end alignment that avoids start-edge overflow |
SafeFlexEnd | 12 | Safe flex-end alignment that avoids start-edge overflow |
SafeFlexStart | 11 | Safe flex-start alignment that avoids start-edge overflow |
SafeSelfEnd | 15 | Safe self-end alignment that avoids start-edge overflow |
SafeSelfStart | 14 | Safe self-start alignment that avoids start-edge overflow |
SafeStart | 9 | Safe start alignment that avoids start-edge overflow |
SelfEnd | 8 | Items aligned to the end edge determined by the item's own direction |
SelfStart | 7 | Items aligned to the start edge determined by the item's own direction |
Start | 0 | Items aligned to the start of the cross axis |
Stretch | 6 | Items stretched to fill the container |