polaris-stack
implements the Polaris Stack component.
Any child elements inside a polaris-stack
block will be auto-wrapped as stack items as per the React component. We also make a polaris-stack/item
component available inside the block to allow more control over the items if desired.
Basic usage:
Vertical stack with tight spacing:
Stack with one item on the left and one pushed to the right:
For dynamic stacks where items are added or removed once the stack has rendered, you must explicitly add an item component around each item to prevent a Glimmer error such as Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node
: