# Stack

Vertical composition with spacing from the shared token scale.

Connect Flood once using [the installation guide](https://flood.md/docs/installation). Then import the components you use; no per-component add command is needed.

## Example

```tsx
"use client";

import { FloodRoot, Stack, Heading, Text } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Stack gap="4">
        <Heading size="section">Project</Heading>
        <Text as="p">One place for your work.</Text>
      </Stack>
    </FloodRoot>
  );
}
```

## Design notes

- The parent owns the gap between its children.
- Spacing keys are strings and use rem. Flood does not reset the host root font size.

## API reference

| Prop | Values | Default |
| --- | --- | --- |
| `gap` | `"0" \| "1" \| "2" \| "3" \| "4" \| "6" \| "8" \| "12"` | `"4"` |
| `Native HTML props` | `HTMLAttributes<HTMLDivElement>` | `Forwarded` |
