Data display and layout
Feature grid
An auto fitting grid of features with icon, title and text.
Example
<div class="feature-grid"><div class="feature"><span class="feature-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13 2 4 14h7l-1 8 9-12h-7l1-8Z"/></svg></span><h3 class="feature-title">No build step</h3><p class="feature-text">Link one file from a CDN and start writing markup.</p></div><div class="feature"><span class="feature-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5"/></svg></span><h3 class="feature-title">Seed theming</h3><p class="feature-text">Every color comes from a single seed, with AA contrast kept.</p></div><div class="feature"><span class="feature-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6l-8-3Z"/></svg></span><h3 class="feature-title">Accessible</h3><p class="feature-text">Native elements, visible focus and reduced motion support.</p></div></div>Classes
5 classes. Click a name to copy it. Utilities on the same element always win over component defaults, so any of them can be adjusted with plain utility classes.
| Class | Type | What it does |
|---|---|---|
| Base | Base class of the feature grid. On a <div> in the example. Sets grid display, grid tracks and gap.CSS |
|
| Part | Part of the feature grid. On a <div> in the example. Sets flex display, alignment and gap.CSS |
|
| Part | Part of the feature grid. On a <span> in the example. Sets grid display, alignment, width, height, margin and corner radius.CSS |
|
| Part | Part of the feature grid. On a <h3> in the example. Sets text size and font weight.CSS |
|
| Part | Part of the feature grid. On a <p> in the example. Sets text size, text style and text color.CSS |
Usage
Components ship inside the same stylesheet as the utilities. There is nothing else to install and no script to load: link Monsoon and write the markup.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/monsooncss">
<!-- Feature grid: start from the base class, then add modifiers -->
<div class="feature-grid"><div class="feature"><span class="feature-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13 2 4 14h7l-1 8 9-12h-7l1-8Z"/></svg></span><h3 class="feature-title">No build step</h3><p class="feature-text">Link one file from a CDN and start writing markup.</p></div><div class="feature"><span class="feature-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5"/></svg></span><h3 class="feature-title">Seed theming</h3><p class="feature-text">Every color comes from a single seed, with AA contrast kept.</p></div><div class="feature"><span class="feature-icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6l-8-3Z"/></svg></span><h3 class="feature-title">Accessible</h3><p class="feature-text">Native elements, visible focus and reduced motion support.</p></div></div>Theme it with --seed on any ancestor, for example style="--seed: #0d9488", and force a scheme with class="dark" or class="light" on a wrapper.
Accessibility
- Every interactive part shows a visible focus ring with
:focus-visible, and tone colors pair with-foregroundtokens that keep text at 4.5:1 or better in light and dark mode.