Zephora UI

Layout

Stack

One-dimensional flex layout with a 0.25rem spacing-grid gap. HStack and VStack are ready-made horizontal and vertical variants.

Import

import { Stack, HStack, VStack } from "@zephora/react";

Examples

Vertical stack

Numbers passed to `gap` map to a 0.25rem grid — gap={4} is 1rem.

First
Second
Third

HStack and VStack

HStack lays items out in a row (center-aligned by default); VStack stacks them.

Shipping address221B Baker Street, London

Wrap and justify

`wrap` lets items flow to the next line; `justify` distributes them.

One
Two
Three
Four

API

Stack props

PropTypeDefaultDescription
direction"row" | "column""column"Flex direction.
gapnumber | stringGap between items. Numbers are a 0.25rem grid (4 → 1rem); strings pass through.
alignCSSProperties["alignItems"]align-items value.
justifyCSSProperties["justifyContent"]justify-content value.
wrapbooleanfalseAllow items to wrap.
askeyof JSX.IntrinsicElements"div"Root element tag.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

HStack / VStack props

PropTypeDefaultDescription
…StackPropsOmit<StackProps, "direction">Same props as Stack with the direction fixed. HStack defaults align to "center".