Columns

Content side by side, one column per cell.

When to use it

Two or three short pieces side by side on wide screens that stack on phones: an address next to a map, text next to an image.

When not to

Page layout in general: widths and columns of a page belong to Layout mode, where each component gets its span per device. Many columns of data belong in a table.

Accessibility

Columns read in the order of the cells, which is also the order on a phone. Keep that order meaningful.

See it live

The component library shows this component in the default theme, in every variant: open it in the component library

The columns example as the component library shows it in the default theme

Where it is used

The starter sites that use it, each at a page that shows it:

Fields

What the component’s dialog asks for. In a Doc, keyed rows start with the key; rows in order follow the order below.

Field

Key

Kind

Required

Content

content

Text with headings, lists, links and bold

No

Variants

This component has no variants of its own; a theme can add some.

In Google Docs

A component is a table. Its first cell names it; the rows below hold its fields. This is the example table:

columns

What we offer: small groups and local guides.

Where we go: mountains, forests and coasts.

In a page file

In a site kept as a folder or in Git, the same component is a block of the page’s JSON file:

JSON
{
  "name": "columns",
  "rows": [
    [
      "What we offer: small groups and local guides.",
      "Where we go: mountains, forests and coasts."
    ]
  ]
}

Markup and classes

What the component writes takes these classes, for a theme’s CSS: the component’s own name, name__part for its parts and name--variant for each variant (the variant’s plain name is there too).

Class

What it marks

columns

The component

columns__column

A part of it

The HTML the example above writes, as the component library builds it in the default theme:

html
<div class="columns">
    <div class="columns__column"><p>What we offer: small groups and local guides.</p></div>
    <div class="columns__column"><p>Where we go: mountains, forests and coasts.</p></div>
</div>

Extending it

Its files in SeedPage. A theme or a site changes the markup by giving a file of the same name (the Liquid part), and a new component can extend this one.

  • src/components/columns.js
  • src/components/columns/columns.liquid