Row Component

The ds-row component provides a horizontal layout container for arranging content with flexible alignment options.

ds-row is a flexible container that can hold any content. It doesn’t impose restrictions on what can be placed inside - use it to arrange any combination of components, text, or HTML elements horizontally.

<ds-row>
<span>Left content</span>
<span>Right content</span>
</ds-row>

Content is distributed with space between:

<ds-row fill>
<ds-text text="Label"></ds-text>
<ds-text text="Value"></ds-text>
</ds-row>

Content is centered with small gaps:

<ds-row centered>
<ds-icon name="check"></ds-icon>
<ds-text text="Completed"></ds-text>
</ds-row>

Content is aligned to the end:

<ds-row end>
<ds-text text="Right aligned"></ds-text>
</ds-row>
AttributeTypeDefaultDescription
fillbooleanfalseDistribute content with space between
centeredbooleanfalseCenter content with gaps
endbooleanfalseAlign content to the end

The row uses flexbox layout:

:host {
display: flex;
flex-direction: row;
align-items: end;
width: calc(240px * var(--sf));
}
:host([fill]) {
justify-content: space-between;
height: calc(var(--1) * var(--sf));
}
:host([centered]) {
justify-content: center;
height: calc(var(--1) * var(--sf));
gap: calc(var(--025) * var(--sf));
}
:host([end]) {
justify-content: flex-end;
height: calc(var(--1) * var(--sf));
gap: calc(var(--025) * var(--sf));
}
<ds-row fill>
<ds-text text="Language"></ds-text>
<ds-text text="English"></ds-text>
</ds-row>
<ds-row centered>
<ds-icon name="star"></ds-icon>
<ds-text text="Favorites"></ds-text>
</ds-row>
<ds-row fill>
<ds-text text="Settings"></ds-text>
<ds-icon name="right"></ds-icon>
</ds-row>