OneScript

VStack

Arrange child views vertically.

Arrange child views vertically. It also accepts Modifiers.

import { Modifier, Text, VStack } from "onescript/views"

<VStack
  alignment="leading"
  spacing={8}
  modifier={Modifier.padding(12)}
>
  <Text>Title</Text>
  <Text>Subtitle</Text>
</VStack>
PropTypeDescription
alignment"leading" | "center" | "trailing"Horizontal child alignment. Defaults to "center".
spacingnumberSpace between children in pt. Uses the system spacing when omitted.
childrenview or view arrayChild views displayed from top to bottom.

How is this guide?

Last updated on