AlignSelf

Cross-axis alignment enumeration for a single element

Overrides the parent's align-items value for a specific child element. This corresponds to the CSS align-self property.

Example

import { Style, AlignSelf } from "taffy-layout"; const style = new Style(); style.alignSelf = AlignSelf.Auto; // Use parent's align-items style.alignSelf = AlignSelf.Center; // Override to center this item

Enumeration Members

Enumeration MemberValueDescription
Auto0Inherits the parent container's align-items value
Baseline6Item aligned to its text baseline
Center5Item centered along the cross axis
End2Item aligned to the end of the cross axis
FlexEnd4Item aligned to the end of the flex container
FlexStart3Item aligned to the start of the flex container
SafeCenter14Safe center alignment that avoids start-edge overflow
SafeEnd11Safe end alignment that avoids start-edge overflow
SafeFlexEnd13Safe flex-end alignment that avoids start-edge overflow
SafeFlexStart12Safe flex-start alignment that avoids start-edge overflow
SafeSelfEnd16Safe self-end alignment that avoids start-edge overflow
SafeSelfStart15Safe self-start alignment that avoids start-edge overflow
SafeStart10Safe start alignment that avoids start-edge overflow
SelfEnd9Item aligned to the end edge determined by its own direction
SelfStart8Item aligned to the start edge determined by its own direction
Start1Item aligned to the start of the cross axis
Stretch7Item stretched to fill the container

© 2026 ByteLand Technology Limited