component :: Feature Grid

The .featureGrid component is the classic marketing “three columns of icon + title + text” pattern, composed over the mCSS grid system.

  • Zero JavaScript

    Just an unordered list and the grid you already have.

  • Responsive by default

    1, 2, then n columns as the viewport grows.

  • Tokenized icons

    Icon box size and colors come from the theme.

FileDescriptionSource
component.featureGrid.cssFeature grid + item stylesGithub
FeatureGrid.astro, FeatureItem.astroThe Astro componentsGithub
--featureItem-* block in default themeTheme tokens (see table below)Github

Depends on .grid (global.grid.css), part of the mCSS core. Icons are yours to bring; Lucide is a great resource.

HTML

One item per <li>: one column on mobile, two from --md, and 2/3/4 (your pick) from --lg.

<ul class="featureGrid grid" col="1" col-md="2" col-lg="3">
<li class="featureItem">
<div class="featureItem_icon" aria-hidden="true"><svg>[…]</svg></div>
<h3 class="featureItem_title">Zero JavaScript</h3>
<div class="featureItem_text">
<p>Just an unordered list and the grid you already have.</p>
</div>
</li>
<!-- more items… -->
</ul>

The icon box is aria-hidden: feature icons are decoration next to a real heading, so screen readers skip them.

Custom properties

The following custom properties are available in the default theme:

PropertyDescription
--featureItem-icon-box-sizeIcon container width/height.
--featureItem-icon-sizeSVG width/height.
--featureItem-icon-colorIcon (stroke/fill) color.
--featureItem-icon-background-colorIcon container background.
--featureItem-icon-border-radiusIcon container radius.

Astro component

FeatureGrid

PropTypeDefaultDescription
colsnumber3Columns from the --lg breakpoint: 2, 3, or 4.
classstringundefinedAdditional CSS classes, useful for helper classes.

FeatureItem

PropTypeDefaultDescription
titlestringundefinedThe item’s h3.
classstringundefinedAdditional CSS classes.
SlotDescription
iconAn SVG icon, rendered in the tokenized icon box.
(default)The item’s body text.

Examples