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

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
Start1Item aligned to the start of the cross axis
Stretch7Item stretched to fill the container

© 2026 ByteLand Technology Limited