Stack

readyNot reviewed for a11y
This page may be removed. Primer plans to move all Rails component documentation to Lookbook.

Description

Stack is a layout component that creates responsive horizontal and vertical flows.

Arguments

NameRequiredDescription
tag
Symbol

Customize the element type of the rendered container.

gap
Symbol

Specify the gap between children elements in the stack. One of nil, :condensed, :normal, or :spacious.

direction
Symbol

Specify the direction for the stack container. One of nil, :horizontal, or :vertical.

align
Symbol

Specify the alignment between items in the cross-axis of the direction. One of nil, :baseline, :center, :end, :start, or :stretch.

wrap
Symbol

Specify whether items are forced onto one line or can wrap onto multiple lines. One of nil, :nowrap, or :wrap.

justify
Symbol

Specify how items will be distributed in the stacking direction. One of nil, :center, :end, :space_between, :space_evenly, or :start.

padding
Symbol

Specify the padding of the stack container. One of nil, :condensed, :none, :normal, or :spacious.

system_arguments