UILayouts
HStack
Arrange child views horizontally.
Arrange child views horizontally. It also accepts Modifiers.
import { HStack, Modifier, Text } from "onescript/views"
<HStack
alignment="center"
spacing={8}
modifier={Modifier.padding(12)}
>
<Text>Left</Text>
<Text>Right</Text>
</HStack>| Prop | Type | Description |
|---|---|---|
alignment | "top" | "center" | "bottom" | Vertical child alignment. Defaults to "center". |
spacing | number | Space between children in pt. Uses the system spacing when omitted. |
children | view or view array | Child views displayed from leading to trailing. |
How is this guide?
Last updated on