Stack

Container Layout draft Gen UI part

Lays children out in a column or a row with a token gap. The only layout tool.

Examples

HTML and CSS

Framework-free reference. Styles live in system/components/stack.css and read only tokens. Wrap markup in .v-root.

Rendered markup of the anatomy example

Props and slots

The component API. Gen UI JSON uses these names, and the Flutter widget should mirror them.

Props

PropValuesDefault
directionvertical | horizontalvertical
gapnone | xs | sm | md | lgsm
alignstart | center | end | stretch | baseline
justifystart | between | center | end
wrapboolean
layoutflow | grid-2 | grid-3 | grid-6 | fillflow
surfacenone | panel | tint | accent | bg | segmentednone

* required.

Slot rules

children: Text, Icon, Avatar, Image, Button, Chip, Badge, Divider, Progress, TextField, Checkbox, Radio, Toggle, Amount, Time, ListItem, List, Tabs, Segmented, AvatarStack, KeyValue, ActionRow, Banner, Toast, MapSnippet, Carousel, SelectTile, Steps, CalendarStrip, Stack, Section. Anything except Card, Bubble and BottomSheet. Add grow: true to a child to let it take the free space in a row.

In Gen UI

How VelioBot uses this part. The bot returns JSON; the validator checks it; the renderer draws it.

JSON node

Every node may also carry id, grow, attribution, privateOnly and fallbackText.

Rules that name this part

listitem-leading List item leading: Icon, Avatar, Avatar stack, Image, Checkbox, Radio (and Time in stacked format).

card-children Card children: Image, Text, Stack, List, KeyValue, Tabs, MapSnippet, Progress, Divider, ActionRow.

Usage in recipes

54 of the original cards use it. Needed for V1. Priority table

Bot functions: All functions, Bill split and payments, Bookings, Calendar and itinerary, Community and PopTonight picks, Email connect, Friend catchups, Friends nearby, Group plans, Learn from chats and posts, Meet new people, More booking, Occasions and events, Onboarding and profile, Plan capture, Plan day and live ETA, Suggestions, Trips, Trust and vouches, Video calls with notes, Voice calls with notes.