Компоненты
Стопка
Располагает дочерние элементы в строку или столбец с равномерными промежутками.
Использование
Базовый
One
Two
Three
HTML
<bs:bsui-stack direction="row" gap="3" align="center" justify="center">
<bs:bsui-badge label="One" />
<bs:bsui-badge label="Two" />
<bs:bsui-badge label="Three" />
</bs:bsui-stack>Колонка на всю ширину
Растянутые дочерние элементы заполняют строку, поэтому кнопки в стеке имеют одинаковую ширину.
HTML
<bs:bsui-stack direction="column" gap="3" align="stretch">
<bs:bsui-button label="Start the free trial" />
<bs:bsui-button label="Talk to sales" variant="outline" />
</bs:bsui-stack>Разделённая строка
Выравнивание по краям отодвигает действие к дальнему краю строки.
3 of 25 sites in use
HTML
<bs:bsui-stack direction="row" gap="3" align="center" justify="space-between">
<bs:bsui-text content="3 of 25 sites in use" variant="muted" />
<bs:bsui-button label="Add site" variant="outline" size="sm" />
</bs:bsui-stack>Пустое состояние по центру
Колонка выравнивается по поперечной оси, чего обычно не происходит по умолчанию.
No deployments yet
Push to the main branch and the first build starts on its own.
HTML
<bs:bsui-stack direction="column" gap="4" align="center">
<bs:bsui-text content="No deployments yet" variant="title" tag="h3" />
<bs:bsui-text content="Push to the main branch and the first build starts on its own." variant="muted" />
<bs:bsui-button label="Read the guide" variant="outline" />
</bs:bsui-stack>Атрибуты
| Атрибут | Тип | По умолчанию |
|---|---|---|
direction | row | |
gap | 2 | |
align | — | |
justify | — | |
wrap | toggle | false |
grow | toggle | false |