このページの翻訳はまだありません。英語版を表示しています。
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 |
Start | 0 | Items aligned to the start of the cross axis |
Stretch | 6 | Items stretched to fill the container |