Stack
The Stack
component is a layout component that allows you to easily stack elements with space between them.
Install and import
Example
The default use of Stack
will stack its children vertically.
FooBarBaz
You can change the direction
& the spacing
.
FooBarBaz
It will ensure that its children are li
s when is rendered as an ul
or an ol
.
Foo Bar Baz
Properties
Name | Type(s) | Default | Required |
---|---|---|---|
as | string | div | |
children | node | ||
direction | column row | column | |
spacing | xxs xs sm md lg xl xxl | md |
Dependencies
- - @welcome-ui/box^2.0.2
- - @welcome-ui/system^2.0.2
Peer dependencies
- - @xstyled/styled-components^1.17.0
- - @xstyled/system^1.17.0
- - react^16.10.2
- - react-dom^16.10.2
- - styled-components^4.0.0 || ^5.0.0