A split pushes its children to opposite ends of the container, filling the space between them. It's what you want whenever you need a logo on one side and navigation on the other, a section heading paired with an action button, or a list item whose label and value sit at opposite ends of the row. Any number of children work: the first one hugs the start, the last one hugs the end, and anything in between is evenly distributed.
By default a split runs horizontally; append :column to stack items vertically instead. When the container gets too narrow for everything to fit on one row, the items wrap automatically.
<divclass="wa-split"><div></div><div></div></div>
Examples
Link to This Section
Splits are especially helpful for navigation, header, and footer layouts.
A column split spreads its items across the height its container gives it. Whether it gets that height depends on how the container lays out its children:
Container
Layout
Column split
wa-flank, wa-cluster, wa-grid, wa-split
Row or grid
Fills the container's height
wa-stack
Column
Shrinks to fit its items
The body part of a drawer or dialog, plain elements
Block
Shrinks to fit its items
To fill a stack, add flex-grow: 1 to the split. To fill a block container, also make the container a flex column. In a drawer or dialog, that container is the body part:
Sign Out
Sign Out
Open Drawer Without the FixOpen Drawer With the Fix
<wa-drawerlabel="Without the Fix"id="split-drawer-without-fix"><divclass="wa-split:column"><navclass="wa-stack"><wa-buttonappearance="plain">Home</wa-button><wa-buttonappearance="plain">Calendar</wa-button><wa-buttonappearance="plain">Mail</wa-button></nav><wa-buttonappearance="plain">Sign Out</wa-button></div></wa-drawer><wa-drawerlabel="With the Fix"id="split-drawer-with-fix"class="navigation-drawer"><divclass="wa-split:column"><navclass="wa-stack"><wa-buttonappearance="plain">Home</wa-button><wa-buttonappearance="plain">Calendar</wa-button><wa-buttonappearance="plain">Mail</wa-button></nav><wa-buttonappearance="plain">Sign Out</wa-button></div></wa-drawer><divclass="wa-cluster"><wa-buttonappearance="outlined"data-drawer="open split-drawer-without-fix">Open Drawer Without the Fix</wa-button><wa-buttonappearance="filled"data-drawer="open split-drawer-with-fix">Open Drawer With the Fix</wa-button></div><style>.navigation-drawer::part(body){display: flex;flex-direction: column;}.navigation-drawer .wa-split\:column{flex-grow: 1;}</style>
Align Items
Link to This Section
By default, items are centered on the cross axis of the wa-split container. Add any wa-align-items-* class to change how items line up: in the block direction for wa-split:row and in the inline direction for wa-split:column.
A split's gap determines how close items can be before they wrap. By default, the gap between split items uses --wa-space-m from your theme. Add any wa-gap-* class to change the spacing between items.