Layout primitives

Stack

Arranges content vertically using a spacing token.

tsx
import Stack from '@precursor/stack';

Example

Release notes

Keep related content in a vertical flow.

tsx
import Stack from '@precursor/stack';
import Heading from '@precursor/heading';
import Text from '@precursor/text';
export default function Example() {
    return (
        <Stack gap="xs">
            <Heading as="h2" size="h4">
                Release notes
            </Heading>
            <Text>Keep related content in a vertical flow.</Text>
        </Stack>
    );
}

Props

Stack props
PropTypeDefaultNotes
childrenRequiredReactNode——
gap"xxs" | "xs" | "s" | "m" | "l" | "xl" | "xxl" | "xxxl"'m'—