StackCol
Arrange related content vertically.
Overview
StackCol is the portable vertical layout primitive for grouped content. It uses a column direction, a gap of 4, and stretched cross-axis alignment; wrapping is off unless you set wrap.
Compare the layout primitives in the Choose a layout component table.
Use when
A title, description, form fields, or supporting content belong in a fixed vertical sequence.
Use instead
Use Stack when the direction may need to change responsively, or StackRow when the layout is always horizontal.
Usage
Project name
Visible to your team.
import { StackCol, Text } from "@smoothie-framework/whisk-react";
<StackCol gap={2}>
<Text weight="semibold">Project name</Text>
<Text color="subtle">Visible to your team.</Text>
</StackCol>Examples
Align
Children stretch across the column by default. Set align="start" when compact controls should retain their intrinsic width.
import { Button, StackCol } from "@smoothie-framework/whisk-react";
<StackCol align="start" gap={3}>
<Button>Invite members</Button>
<Button variant="secondary">Manage roles</Button>
</StackCol>Form fields
Use StackCol to keep related fields in a readable vertical rhythm. Each Field still owns its accessible label and validation relationship.
import { Field, StackCol, TextInput } from "@smoothie-framework/whisk-react";
<StackCol gap={4}>
<Field label="Workspace name" description="Used in invitations and notifications.">
<TextInput name="workspace-name" />
</Field>
<Field label="Team name" description="Shown to workspace members.">
<TextInput name="team-name" />
</Field>
</StackCol>Dividers
StackCol does not add separators. When headings already establish the sections, use a decorative Divider for the visible rule.
Notifications
Choose where this workspace can contact you.
Privacy
Control who can see workspace activity.
import { Divider, Heading, StackCol, Text } from "@smoothie-framework/whisk-react";
<StackCol gap={3}>
<Heading level={4} size="sm">Notifications</Heading>
<Text color="subtle">Choose where this workspace can contact you.</Text>
<Divider decorative />
<Heading level={4} size="sm">Privacy</Heading>
<Text color="subtle">Control who can see workspace activity.</Text>
</StackCol>Props
Component props
Shared props
Accessibility
StackCol renders a layout div, not a list, group, or landmark. Preserve the document order and use semantic children for headings, form controls, and landmarks. Insert a Divider explicitly when a visible rule marks a meaningful boundary.