Lynx
VStack
VStack 컴포넌트는 Lynx에서 자식 요소를 세로 방향으로 쌓는 레이아웃 컴포넌트입니다.
사용을 권장하지 않아요
레이아웃은 사용 중인 zero-runtime 스타일링 라이브러리로 구성하는 것을 권장해요. 이유와 대체 예제는 Styling 가이드에서 확인하세요.
Installation
Usage
VStack은 Lynx 네이티브 <view>를 직접 렌더링하며 display="flex"와 flexDirection="column"을 기본 적용합니다. Box를 내부에서 합성하지 않아 반복 렌더링에서 primitive 컴포넌트 단계를 줄입니다.
Props
Prop
Type
bg?(string & {}) | ScopedColorBg | ScopedColorPalette | ScopedColorBanner | undefinedbackground?(string & {}) | ScopedColorBg | ScopedColorPalette | ScopedColorBanner | undefinedcolor?(string & {}) | ScopedColorPalette | ScopedColorFg | undefinedborderColor?(string & {}) | ScopedColorPalette | ScopedColorStroke | undefinedborderWidth?0 | (string & {}) | 1 | undefinedborderTopWidth?0 | (string & {}) | 1 | undefinedborderRightWidth?0 | (string & {}) | 1 | undefinedborderBottomWidth?0 | (string & {}) | 1 | undefinedborderLeftWidth?0 | (string & {}) | 1 | undefinedborderRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderTopLeftRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderTopRightRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderBottomRightRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedborderBottomLeftRadius?0 | (string & {}) | "r0_5" | "r1" | "r1_5" | "r2" | "r2_5" | "r3" | "r3_5" | "r4" | "r5" | "r6" | "full" | undefinedwidth?Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "full" | undefinedminWidth?Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "full" | undefinedmaxWidth?Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "full" | undefinedheight?Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "full" | undefinedminHeight?Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "full" | undefinedmaxHeight?Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | "full" | undefinedtop?0 | (string & {}) | undefinedleft?0 | (string & {}) | undefinedright?0 | (string & {}) | undefinedbottom?0 | (string & {}) | undefinedpadding?0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedp?0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpaddingX?0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpx?0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpaddingY?0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpy?0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpaddingTop?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpt?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpaddingRight?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpr?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpaddingBottom?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpb?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpaddingLeft?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedpl?0 | "safeArea" | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedposition?(string & {}) | "relative" | "absolute" | "fixed" | undefinedoverflowX?"hidden" | (string & {}) | "visible" | undefinedoverflowY?"hidden" | (string & {}) | "visible" | undefinedzIndex?Property.ZIndex | undefinedjustifySelf?Property.JustifySelf | undefinedalignContent?(string & {}) | "center" | "stretch" | "flexStart" | "flexEnd" | undefinedalignSelf?(string & {}) | "center" | "stretch" | "flexStart" | "flexEnd" | undefinedgap?0 | Dimension | "spacingX.betweenChips" | "spacingX.globalGutter" | "spacingY.componentDefault" | "spacingY.navToTitle" | "spacingY.screenBottom" | "spacingY.betweenText" | (string & {}) | undefinedbleed?BleedValue | undefinedbleedX?BleedValue | undefinedbleedY?BleedValue | undefinedbleedTop?BleedValue | undefinedbleedRight?BleedValue | undefinedbleedBottom?BleedValue | undefinedbleedLeft?BleedValue | undefinedmargin?MarginValue | undefinedm?MarginValue | undefinedmarginX?MarginValue | undefinedmx?MarginValue | undefinedmarginY?MarginValue | undefinedmy?MarginValue | undefinedmarginTop?MarginValue | undefinedmt?MarginValue | undefinedmarginRight?MarginValue | undefinedmr?MarginValue | undefinedmarginBottom?MarginValue | undefinedmb?MarginValue | undefinedmarginLeft?MarginValue | undefinedml?MarginValue | undefinedalign?(string & {}) | "center" | "stretch" | "flexStart" | "flexEnd" | undefinedjustify?(string & {}) | "center" | "flexStart" | "flexEnd" | "spaceBetween" | "spaceAround" | undefinedwrap?boolean | "nowrap" | "wrap" | undefinedgrow?boolean | Property.FlexGrow | undefinedshrink?boolean | Property.FlexShrink | undefinedLayout Aliases
VStack은 자주 쓰는 flex 속성을 짧은 alias로 제공합니다.
| Prop | 적용되는 style |
|---|---|
align | alignItems |
justify | justifyContent |
wrap | flexWrap |
grow | flexGrow |
shrink | flexShrink |
나머지 스타일 prop은 Box와 동일한 범위에서 사용할 수 있습니다.
웹 버전과의 차이
Lynx VStack은 React VStack과 다음과 같은 차이가 있습니다.
as,asChild를 지원하지 않습니다. 항상 Lynx 네이티브<view>를 렌더링합니다.- 지원하지 않는 StyleProps는
Box와 동일하게 열지 않습니다.
Last updated on