Soracom

Design System
  1. Home
  2. Design system
  3. Containers
  4. Rows

Rows

A generic container for row layout

Overview

The .ds-rows class (previously .ds-layout__rows) provides generic row layouts with options to implement fixed width child rows or columns.

The ds-rows class applied to a container element causes the containers child elements to display as a vertical list of horizontal rows, with a vertical gutter between each row. ds-rows is divided into 12 columns, with each row spanning all 12 columns (the full width of the container) by default.

Options

Basic usage

html
Copy

Layout

ds-rows supports layout modifiers for aligning row content, limiting the container width, and allowing the container to grow to fill the available height.

Center and middle

Use --center to align row content horizontally and --middle to align row content vertically.

Centered horizontally and vertically

html
Copy

Limit

Use --limit to limit the width of the rows container and center it within the available space.

html
Copy

Grow

Use --grow when the rows container should grow to fill the available height of its parent.

html
Copy

Indent

Indents the contents, this would generally be used on the main outer container of content.

Available indent modifiers:

TypeModifiers
All sides--indent, --no-indent
Sized--indent-xxsmall, --indent-xsmall, --indent-small, --indent-medium, --indent-large, --indent-xlarge, --indent-xxlarge
Vertical--v-indent, --no-v-indent, --v-indent-xxsmall, --v-indent-xsmall, --v-indent-small, --v-indent-medium, --v-indent-large, --v-indent-xlarge, --v-indent-xxlarge
Horizontal--h-indent, --no-h-indent, --h-indent-xxsmall, --h-indent-xsmall, --h-indent-small, --h-indent-medium, --h-indent-large, --h-indent-xlarge, --h-indent-xxlarge

Small

html
Copy

Medium (Default)

html
Copy

Large

html
Copy

No indent

html
Copy

A specific row can be "outdented" using ds-row--outdent

html
Copy

Column width

As an alternative ds-cols in some situations, ds-rows can be used to display column content.

If a direct child element of ds-rows has a class of .ds-span --X where X is a value betwen 1-12 that child element will display at that width.

Adjacent child elements with a .ds-span --X value will act like columns without the need of wrapping those rows in a parent element.

html
Copy

Gap

Use gap modifiers to control the spacing between rows and columns.

Available gap modifiers:

TypeModifiers
All directions--gap, --no-gap
Sized--gap-xxsmall, --gap-xsmall, --gap-small, --gap-medium, --gap-large, --gap-xlarge, --gap-xxlarge
Vertical--v-gap, --no-v-gap, --v-gap-xxsmall, --v-gap-xsmall, --v-gap-small, --v-gap-medium, --v-gap-large, --v-gap-xlarge, --v-gap-xxlarge
Horizontal--h-gap, --no-h-gap, --h-gap-xxsmall, --h-gap-xsmall, --h-gap-small, --h-gap-medium, --h-gap-large, --h-gap-xlarge, --h-gap-xxlarge

No gap

html
Copy

Large gap

html
Copy

No horizontal gap

html
Copy

No vertical gap

html
Copy

Loading

Use --loading to show a loading state over the rows container. Add data-ds-message to provide visible loading text.

html
Copy

Examples

Nested indents

html
Copy

Manifest

The component manifest describes this component's API: its modifiers, structure, data attributes, CSS custom properties, accessibility notes, and example markup. It is consumed by tooling such as AI assistants and code generators.

Latest version: https://assets.soracom.io/sds/latest/ds-rows/manifest.json

manifest.json
Copy