Skip to content
Playground

VStack

A vertical Stack convenience primitive with logical-axis alignment.

VStack is Stack with a fixed vertical direction. It adds horizontal and vertical alignment aliases while retaining Stack’s complete spacing and sizing API.

TSX
import { VStack } from "@zentara-co/zenos-ui";

hAlign aligns children horizontally and maps to Stack’s align. vAlign distributes children vertically and maps to Stack’s justify.

startBottom
centerBottom
endBottom

The shared align and justify props take precedence over aliases when both are supplied. VStack also supports responsive gap, wrapping, padding, size constraints, scrolling, polymorphism, and native props.

Use VStack when fixed vertical intent improves readability. Use Stack when direction changes responsively.

API

PropTypeDefaultDescription
as ElementType div Rendered semantic element.
hAlign Responsive<Align> — Horizontal alignment.
vAlign Responsive<Justify> — Vertical distribution.
gap Responsive<Spacing> 4 Space between children.
wrap Responsive<boolean | FlexWrap> false Wrapping behavior.
shared Stack props padding*, size constraints, isScrollable — VStack supports Stack spacing, sizing, scrolling, and native props.
native props React.HTMLAttributes<HTMLElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

VStack changes layout only. Render lists, navigation, sections, and other structures through as when those semantics apply, and preserve a logical source order.