このページの翻訳はまだありません。英語版を表示しています。

JustifyContent

Main axis alignment enumeration

Defines how flex items are aligned and spaced along the main axis. This corresponds to the CSS justify-content property.

Example

import { Style, JustifyContent } from "taffy-layout"; const style = new Style(); style.justifyContent = JustifyContent.Center; // Center items style.justifyContent = JustifyContent.SpaceBetween; // Distribute evenly

Enumeration Members

Enumeration MemberValueDescription
Center4Items centered along the main axis
End1Items packed toward the end of the main axis
FlexEnd3Items packed toward the end of the flex container
FlexStart2Items packed toward the start of the flex container
SpaceAround7Items evenly distributed with equal space around each
SpaceBetween6Items evenly distributed with first/last at edges
SpaceEvenly8Items evenly distributed with equal space between each
Start0Items packed toward the start of the main axis
Stretch5Items stretched along the main axis

© 2026 ByteLand Technology Limited