Stack
Leave feedbackShorthand helpers that build on top of our flexbox utilities to make component layout faster and easier than ever. Similar to the Bootstrap Stack component.
Basic Usage
Vertical direction
Stacks are vertical by default and stacked items are full-width by default. Watch this pull request to see more details about the auto stretching behavior.
Show editable code example
Any Paragon component or export may be added to the code example.
Horizontal direction
Show editable code example
Any Paragon component or export may be added to the code example.
Theme Variables (SCSS)#
$stack-gap: 0 !default;
Props API#
Stack Props API
- children
nodeRequiredSpecifies the content of the
Stack. - direction
enum'horizontal' | 'vertical'Default'vertical'Specifies direction of the children blocks (column/row).
- gap
numberDefault0Specifies inner space between children blocks.
Valid values are based on
the spacing classes:0, 0.5, ... 6. - className
stringSpecifies an additional
classNameto add to the base element.
Usage Insights#
Stack
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 10 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 10 | |
| frontend-app-support-tools | 20.45.0 | 4 | |
| frontend-lib-content-components | 20.45.0 | 12 |