Marketing sectionsIndexListColumns
Searchastronomic.dev# IndexListColumns
For a list of what you cover, like industries, places or services, in two ruled columns under a heading.
Static: no JavaScript.
## Usage
```astro
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
```
## Examples
### What the kit covers
The header above the list; the list in one column, two from a 42rem index container. The rows run across, then down, and both columns share the top hairline.
```astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
// The directory's own groups, each with its page and a count.
const groups = [
{ label: "Marketing sections", href: "#marketing", meta: "58 parts" },
{ label: "Data display", href: "#data-display", meta: "23 parts" },
{ label: "Navigation", href: "#navigation", meta: "16 parts" },
{ label: "Forms", href: "#forms", meta: "7 parts" },
{ label: "Publishing sections", href: "#publishing", meta: "5 parts" },
{ label: "Layout", href: "#layout", meta: "5 parts" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<IndexListColumns heading="What the kit covers" items={groups} />
</div>
```
### Without a heading
No heading: a plain <div> holds only the list, under your own heading.
```astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
import { displayType } from "@astronomic-dev/ui/lib/display.ts";
const groups = [
{ label: "Marketing sections", href: "#marketing", meta: "58 parts" },
{ label: "Data display", href: "#data-display", meta: "23 parts" },
{ label: "Navigation", href: "#navigation", meta: "16 parts" },
{ label: "Forms", href: "#forms", meta: "7 parts" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<div class="grid gap-blocks">
<!-- Your own heading: with no heading the list is a plain <div>, not a region. -->
<h2 class={`m-0 text-title text-balance ${displayType}`}>Browse by group</h2>
<IndexListColumns items={groups} />
</div>
</div>
```
### Your own marker
marker={Star}: your icon component at the start of each row, in place of the dot.
```astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
// Your own icon component: here the Astronomic star, as an SVG file.
import Star from "../../logos/astronomic-star.svg";
const groups = [
{ label: "Marketing sections", href: "#marketing", meta: "58 parts" },
{ label: "Data display", href: "#data-display", meta: "23 parts" },
{ label: "Navigation", href: "#navigation", meta: "16 parts" },
{ label: "Forms", href: "#forms", meta: "7 parts" },
{ label: "Publishing sections", href: "#publishing", meta: "5 parts" },
{ label: "Layout", href: "#layout", meta: "5 parts" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<IndexListColumns heading="What the kit covers" items={groups} marker={Star} />
</div>
```
### Long labels and notes
A long label wraps in its own column of the row; a long note keeps to its column, at most 40% of the row, and wraps there, so nothing runs out at 320px.
```astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
const rows = [
{ label: "Accessibility reviews and editor training", href: "#training", meta: "Two days on site, or four online sessions" },
{ label: "Content migration", href: "#migration", meta: "From any CMS" },
{ label: "Hosting and care plans" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<!-- A long label wraps on its own line of the row; a long note keeps to its column (at most 40% of the row) and wraps there. -->
<IndexListColumns heading="Services at a glance" items={rows} />
</div>
```
## Props
### IndexListColumns
| 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 "Where we *know* the ground". 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. The rows are not headings: each is a label. |
| `items` | `IndexItem[]` | None | Required. The rows, in order: { label, href?, meta? }. label is the row's name, in the subhead role; with href the whole row is one link named by it; meta is your own short text after it, such as "31 clients" or "6 weeks", small and muted, wrapping in a column at most 40% of the row. An empty list stops the build. |
| `marker` | `IconComponent` | None | The mark at the start of each row: your icon component (e.g. a star), at the small icon size, in the text color. Without it, a small dot in the accent. Decorative. |
| `class` | `string` | None | More classes for the root (the <section>, or the <div> without a heading), merged with cn(), so yours win on conflicts. The root is a named size container (inline-size containment): in a shrink-to-fit parent (inline-flex, a float, fit-content) it collapses, so give it a width there. |
| 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> without a heading.
## Accessibility
- With a heading it is a region named by it: a <section> whose heading id is unique on the page.
- Without a heading it is a plain <div>. Put your own heading above it.
- The rows are a list, so a screen reader hears "list, N items", then each row in order.
- Each linked row is one link, named by its label; the meta is read after it. A click anywhere on the row follows it, and the focus ring goes round the row, inside its hairlines.
- Rows are at least 44px tall on touch screens.
- The marker is decoration, hidden from screen readers.
IndexListColumns
FreeFor a list of what you cover, like industries, places or services, in two ruled columns under a heading.
- File
- IndexListColumns.astro
- Group
- Marketing sections
- Kind
- Static: no JavaScript
- Examples
- 4
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
What the kit covers
The header above the list; the list in one column, two from a 42rem index container. The rows run across, then down, and both columns share the top hairline.
This preview did not load.
examples/indexlistcolumns/main.astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
// The directory's own groups, each with its page and a count.
const groups = [
{ label: "Marketing sections", href: "#marketing", meta: "58 parts" },
{ label: "Data display", href: "#data-display", meta: "23 parts" },
{ label: "Navigation", href: "#navigation", meta: "16 parts" },
{ label: "Forms", href: "#forms", meta: "7 parts" },
{ label: "Publishing sections", href: "#publishing", meta: "5 parts" },
{ label: "Layout", href: "#layout", meta: "5 parts" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<IndexListColumns heading="What the kit covers" items={groups} />
</div>Without a heading
No heading: a plain <div> holds only the list, under your own heading.
This preview did not load.
examples/indexlistcolumns/no-heading.astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
import { displayType } from "@astronomic-dev/ui/lib/display.ts";
const groups = [
{ label: "Marketing sections", href: "#marketing", meta: "58 parts" },
{ label: "Data display", href: "#data-display", meta: "23 parts" },
{ label: "Navigation", href: "#navigation", meta: "16 parts" },
{ label: "Forms", href: "#forms", meta: "7 parts" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<div class="grid gap-blocks">
<!-- Your own heading: with no heading the list is a plain <div>, not a region. -->
<h2 class={`m-0 text-title text-balance ${displayType}`}>Browse by group</h2>
<IndexListColumns items={groups} />
</div>
</div>Your own marker
marker={Star}: your icon component at the start of each row, in place of the dot.
This preview did not load.
examples/indexlistcolumns/with-marker.astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
// Your own icon component: here the Astronomic star, as an SVG file.
import Star from "../../logos/astronomic-star.svg";
const groups = [
{ label: "Marketing sections", href: "#marketing", meta: "58 parts" },
{ label: "Data display", href: "#data-display", meta: "23 parts" },
{ label: "Navigation", href: "#navigation", meta: "16 parts" },
{ label: "Forms", href: "#forms", meta: "7 parts" },
{ label: "Publishing sections", href: "#publishing", meta: "5 parts" },
{ label: "Layout", href: "#layout", meta: "5 parts" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<IndexListColumns heading="What the kit covers" items={groups} marker={Star} />
</div>Long labels and notes
A long label wraps in its own column of the row; a long note keeps to its column, at most 40% of the row, and wraps there, so nothing runs out at 320px.
This preview did not load.
examples/indexlistcolumns/long-text.astro
---
import IndexListColumns from "@astronomic-dev/ui/components/IndexListColumns.astro";
const rows = [
{ label: "Accessibility reviews and editor training", href: "#training", meta: "Two days on site, or four online sessions" },
{ label: "Content migration", href: "#migration", meta: "From any CMS" },
{ label: "Hosting and care plans" },
];
---
<div class="mx-auto max-w-6xl px-6 py-16">
<!-- A long label wraps on its own line of the row; a long note keeps to its column (at most 40% of the row) and wraps there. -->
<IndexListColumns heading="Services at a glance" items={rows} />
</div>