Profiles

A group of people, each linked to their profile fragment.

When to use it

A team or a group of people, each kept once as a profile fragment and shown together.

When not to

One person (use profile).

Accessibility

A list, so screen readers say how many people there are.

See it live

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

The profiles 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. Each row is one item, its cells in the order of the fields.

Field

Key

Kind

Required

Link to the person fragment

person

A link: its text and address

Yes

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:

profiles

Ana Ruiz (https://docs.google.com/document/d/PERSON_DOC_ID/edit)

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": "profiles",
  "rows": [
    [
      {
        "link": "Ana Ruiz",
        "href": "https://docs.google.com/document/d/PERSON_DOC_ID/edit"
      }
    ]
  ]
}

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

profiles

The component

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

html
<div class="profiles">
<div class="profile">
<div class="profile__photo"><span class="profile__initials" aria-hidden="true">AR</span></div>
<h3 class="profile__name">Ana Ruiz</h3>
<p class="profile__roles">Mountain guide</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/profiles.js
  • src/components/profiles/profiles.liquid