# Cluster

An inline group that wraps onto new lines (buttons, tags, nav links).

_Diagram: A cluster is a row of buttons, tags or nav links under a heading that wraps onto a second line when the row is full._

## Live example

### Cluster

```html
<ul class="cluster">
  <li><code>reset</code></li>
  <li><code>tokens</code></li>
  <li><code>base</code></li>
  <li><code>layout</code></li>
  <li><code>components</code></li>
  <li><code>utilities</code></li>
</ul>
```

## API

| Attribute or value | Effect |
| --- | --- |
| `class="cluster"` |  |
| `--cluster-gap` | space between items (default: `var(--dui-space-s)`) |
| `--cluster-justify` | justify-content value (default: flex-start) |
| `--cluster-align` | align-items value (default: center) |

Pattern: "The Cluster", Every Layout, built with flex-wrap and gap.

The custom properties do not inherit, so nested clusters keep their defaults.

## Specifications

- [Every Layout cluster](https://every-layout.dev/layouts/cluster/)

## See also

- [Layouts](https://domestic-ui.odonckers.dev/layouts/index.md)
- [Component API convention](https://domestic-ui.odonckers.dev/index.md#component-api)
- [Accessibility baseline](https://domestic-ui.odonckers.dev/principles/accessibility-baseline-wcag-22-aa.md)
- Source: [`css/layout/cluster.css`](https://github.com/odonckers/domestic-ui/blob/main/css/layout/cluster.css), [`examples/base.html`](https://github.com/odonckers/domestic-ui/blob/main/examples/base.html)

## How other systems do it

For comparison only; these are not the standard this system follows.

- Apple Human Interface Guidelines: No equivalent
- Material Design 3: No equivalent
- Vercel Geist: No equivalent
