Marketing sectionsFeatureRows
Searchastronomic.dev# FeatureRows
To explain a few features in depth, each with a picture, the sides swapping row by row.
Static: no JavaScript.
## Usage
```astro
import FeatureRows from "@astronomic-dev/ui/components/FeatureRows.astro";
```
## Examples
### How a project runs
Each feature is a full row: its text and a picture side by side from a 48rem section, the picture at the end, then the start, row by row. Below that, the picture sits on top of its text.
```astro
---
import FeatureRows from "@astronomic-dev/ui/components/FeatureRows.astro";
// Your own image files.
import sketching from "../../photos/sketching-wireframes.webp";
import desk from "../../photos/studio-desk.webp";
import notebook from "../../photos/leather-notebook.webp";
const features = [
{ title: "We start on paper", text: "Before any screen, we sketch the pages with you, so the structure is right before it looks right.", image: { src: sketching, alt: "A hand sketching wireframes beside a mug." } },
{ title: "Then we design in the browser", text: "You see real pages early, on your own phone, and we change them as we go.", image: { src: desk, alt: "A laptop, a framed print and a cactus on a light wood desk." } },
{ title: "And we hand it over with care", text: "A short guide, an hour of training, and a month of small fixes after the launch.", image: { src: notebook, alt: "A leather notebook, a pen and a clip on pale paper." } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<FeatureRows heading="How a project runs" text="Three steps, from the first sketch to the launch." items={features} />
</div>
```
### In a narrow column
The same rows in a 24rem column on a wide page: they follow their own width, not the page, so each picture stays on top of its text.
```astro
---
import FeatureRows from "@astronomic-dev/ui/components/FeatureRows.astro";
// Your own image files.
import sketching from "../../photos/sketching-wireframes.webp";
import desk from "../../photos/studio-desk.webp";
import notebook from "../../photos/leather-notebook.webp";
const features = [
{ title: "We start on paper", text: "Before any screen, we sketch the pages with you, so the structure is right before it looks right.", image: { src: sketching, alt: "A hand sketching wireframes beside a mug." } },
{ title: "Then we design in the browser", text: "You see real pages early, on your own phone, and we change them as we go.", image: { src: desk, alt: "A laptop, a framed print and a cactus on a light wood desk." } },
{ title: "And we hand it over with care", text: "A short guide, an hour of training, and a month of small fixes after the launch.", image: { src: notebook, alt: "A leather notebook, a pen and a clip on pale paper." } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<div class="max-w-sm">
<FeatureRows heading="How a project runs" text="Three steps, from the first sketch to the launch." items={features} />
</div>
</div>
```
## Props
### FeatureRows
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `heading` | `string` | None | The section heading, in the title role in display type. Without it there is no section and no header: a plain <div> holds only the list. |
| `emphasis` | `boolean` | `false` | Turn one *phrase* in the heading into <em>: exactly two asterisks around text with no space inside, as in "Built for *the long run*". Any other asterisks show as typed. Off by default, so the heading shows as typed. How the <em> looks is the theme's. |
| `mark` | `string` | None | A short mark after the heading, such as "(12)" or "©2026", in small muted type. It sits beside the heading, outside it, so the heading's name stays plain. Shown only with a heading. |
| `markLabel` | `string` | None | What the mark says to a screen reader, such as "12 projects": the mark is then hidden from screen readers and this is read in its place. Without it, the mark is read as written. |
| `text` | `string` | None | One or two sentences under the heading, in the lead role, muted. Shown only with a heading. |
| `headingTag` | `"h2" \| "h3" \| "h4"` | `"h2"` | The heading element. Item titles sit one level under it. |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> around the list without a heading), merged with cn(), so yours win on conflicts. |
| `itemHeadingTag` | `"h2" \| "h3" \| "h4" \| "h5"` | `"h3"` | The item title element when there is no heading. |
| `items` | `{ title, text, image: MediaImage }[]` | None | Required, and each item needs its image. The image is a Media at ratio 4/3 and loading lazy unless set. MediaImage is { src, alt, width?, height?, ratio?, loading?, focalPoint? }. |
| Slot | Description |
| --- | --- |
| `eyebrow` | A short line above the heading, such as a Badge. Shown only with a heading. |
Any other attribute goes on the <section>, or on the <div> around the list without a heading.
## Accessibility
- With a heading, renders a <section> named by it, so it is a region landmark. The heading id is unique on the page.
- Without a heading, renders only the list in a plain <div>, with no section and no header (text and the eyebrow are left out). Put your own heading above it.
- The items sit in one list (<ul role="list">), so a screen reader says how many there are.
- Each item title sits one level under the section heading (h2 gives h3). With no heading, it is an h3 unless you set itemHeadingTag.
- In each row the text comes before the picture in the page order, so a screen reader reads the title first; only the visual order changes. Each image needs alt like any Media; use alt="" when it only decorates.
FeatureRows
FreeTo explain a few features in depth, each with a picture, the sides swapping row by row.
- File
- FeatureRows.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 2
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
How a project runs
Each feature is a full row: its text and a picture side by side from a 48rem section, the picture at the end, then the start, row by row. Below that, the picture sits on top of its text.
This preview did not load.
main.astro
examples/featurerows/main.astro
---
import FeatureRows from "@astronomic-dev/ui/components/FeatureRows.astro";
// Your own image files.
import sketching from "../../photos/sketching-wireframes.webp";
import desk from "../../photos/studio-desk.webp";
import notebook from "../../photos/leather-notebook.webp";
const features = [
{ title: "We start on paper", text: "Before any screen, we sketch the pages with you, so the structure is right before it looks right.", image: { src: sketching, alt: "A hand sketching wireframes beside a mug." } },
{ title: "Then we design in the browser", text: "You see real pages early, on your own phone, and we change them as we go.", image: { src: desk, alt: "A laptop, a framed print and a cactus on a light wood desk." } },
{ title: "And we hand it over with care", text: "A short guide, an hour of training, and a month of small fixes after the launch.", image: { src: notebook, alt: "A leather notebook, a pen and a clip on pale paper." } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<FeatureRows heading="How a project runs" text="Three steps, from the first sketch to the launch." items={features} />
</div>In a narrow column
The same rows in a 24rem column on a wide page: they follow their own width, not the page, so each picture stays on top of its text.
This preview did not load.
narrow.astro
examples/featurerows/narrow.astro
---
import FeatureRows from "@astronomic-dev/ui/components/FeatureRows.astro";
// Your own image files.
import sketching from "../../photos/sketching-wireframes.webp";
import desk from "../../photos/studio-desk.webp";
import notebook from "../../photos/leather-notebook.webp";
const features = [
{ title: "We start on paper", text: "Before any screen, we sketch the pages with you, so the structure is right before it looks right.", image: { src: sketching, alt: "A hand sketching wireframes beside a mug." } },
{ title: "Then we design in the browser", text: "You see real pages early, on your own phone, and we change them as we go.", image: { src: desk, alt: "A laptop, a framed print and a cactus on a light wood desk." } },
{ title: "And we hand it over with care", text: "A short guide, an hour of training, and a month of small fixes after the launch.", image: { src: notebook, alt: "A leather notebook, a pen and a clip on pale paper." } },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<div class="max-w-sm">
<FeatureRows heading="How a project runs" text="Three steps, from the first sketch to the launch." items={features} />
</div>
</div>Minimal · Light