layout.collection

Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters

Component

Renders

<div>

Profile

Example

Preview

One

Two

Three

<Layout intent="layout.collection">
…
</Layout>

Choosing between neighbours

Find the row that describes your element, and use the intent on the right.

  • If it is

    Use

  • Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters

    layout.collection this page
  • Equal items in a grid that all stay the same size

    rather than layout.showcase
    layout.collection this page
  • Equal items shown side by side as a grid

    rather than layout.list
    layout.collection this page
  • Headline figures that stand on their own

    rather than layout.tally
    layout.collection this page

Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

For registry authors

Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.

What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.

How layout.collection resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

  • arrange.grid

    Grid of equal cells, as many columns as its own width fits

    grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))]
  • layout.collection

    Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters

    gap-6
Final classes
grid grid-cols-[repeat(auto-fit,minmax(min(100%,14rem),1fr))]
gap-6
Definition
TS
'layout.collection': {
kind: 'semantic',
description: 'Equal items shown side by side as a grid: people to follow, featured sources. It fits as many columns as its own width allows, so it works in a sidebar as well as across a page; set columns from a breakpoint only when the count matters',
refs: ['arrange.grid'],
binding: { classes: 'gap-6' },
},