
Composite
CollectionList
Collection entries as a grid or a list, each rendered by its preset’s card.
Grid
On a list page, renderList returns entries and page. Each entry carries its preset, which picks the card. See the blog demo.


Oct 15, 2026 · 2 min read
Translations live in a folder per language and link by filename.
- i18n
---
import CollectionList from '@alfadormx/blocks/composite/CollectionList.astro';
import type { CollectionListEntry } from '@alfadormx/blocks/types/collectionlist';
const entries: CollectionListEntry[] = [
{
preset: 'post',
headline: { title: 'Hello, world' },
href: '/demos/saas/blog/hello-world',
description: 'Why this library ships Markdown collections.',
date: new Date('2026-10-01T12:00:00Z'),
readingTime: 1,
tags: ['announcement'],
image: {
src: '~/assets/images/content/writing-notebook.jpg',
alt: 'A hand writing notes with a pen in a notebook on a wooden desk',
},
},
{
preset: 'post',
headline: { title: 'Writing in two languages' },
href: '/demos/saas/blog/second-post',
description: 'Translations live in a folder per language and link by filename.',
date: new Date('2026-10-15T12:00:00Z'),
readingTime: 2,
tags: ['i18n'],
image: {
src: '~/assets/images/content/dictionary-page.jpg',
alt: 'An open dictionary showing the entry for Esperanto',
},
},
{
preset: 'post',
headline: { title: 'An English-only post' },
href: '/demos/saas/blog/third-post',
description: 'This entry has no Spanish translation.',
date: new Date('2026-11-01T12:00:00Z'),
tags: ['i18n'],
},
];
---
<CollectionList entries={entries} />List
orientation: 'vertical' stacks the cards in one column.


Oct 15, 2026 · 2 min read
Translations live in a folder per language and link by filename.
- i18n
---
import CollectionList from '@alfadormx/blocks/composite/CollectionList.astro';
import type { CollectionListEntry } from '@alfadormx/blocks/types/collectionlist';
const entries: CollectionListEntry[] = [
{
preset: 'post',
headline: { title: 'Hello, world' },
href: '/demos/saas/blog/hello-world',
description: 'Why this library ships Markdown collections.',
date: new Date('2026-10-01T12:00:00Z'),
readingTime: 1,
tags: ['announcement'],
image: {
src: '~/assets/images/content/writing-notebook.jpg',
alt: 'A hand writing notes with a pen in a notebook on a wooden desk',
},
},
{
preset: 'post',
headline: { title: 'Writing in two languages' },
href: '/demos/saas/blog/second-post',
description: 'Translations live in a folder per language and link by filename.',
date: new Date('2026-10-15T12:00:00Z'),
readingTime: 2,
tags: ['i18n'],
image: {
src: '~/assets/images/content/dictionary-page.jpg',
alt: 'An open dictionary showing the entry for Esperanto',
},
},
];
---
<CollectionList entries={entries} orientation="vertical" gap="tight" />Shared card config
defaultPostCardConfig is merged under every post card; an entry’s own values win.


Oct 15, 2026 · 2 min read
Translations live in a folder per language and link by filename.
- i18n
---
import CollectionList from '@alfadormx/blocks/composite/CollectionList.astro';
import type { CollectionListEntry } from '@alfadormx/blocks/types/collectionlist';
const entries: CollectionListEntry[] = [
{
preset: 'post',
headline: { title: 'Hello, world' },
href: '/demos/saas/blog/hello-world',
description: 'Why this library ships Markdown collections.',
date: new Date('2026-10-01T12:00:00Z'),
readingTime: 1,
tags: ['announcement'],
image: {
src: '~/assets/images/content/writing-notebook.jpg',
alt: 'A hand writing notes with a pen in a notebook on a wooden desk',
},
},
{
preset: 'post',
headline: { title: 'Writing in two languages' },
href: '/demos/saas/blog/second-post',
description: 'Translations live in a folder per language and link by filename.',
date: new Date('2026-10-15T12:00:00Z'),
readingTime: 2,
tags: ['i18n'],
image: {
src: '~/assets/images/content/dictionary-page.jpg',
alt: 'An open dictionary showing the entry for Esperanto',
},
},
{
preset: 'post',
headline: { title: 'An English-only post' },
href: '/demos/saas/blog/third-post',
description: 'This entry has no Spanish translation.',
date: new Date('2026-11-01T12:00:00Z'),
tags: ['i18n'],
},
];
---
<CollectionList
entries={entries}
defaultPostCardConfig={{ readMoreLabel: 'Continue reading', readingTime: false }}
/>Pager
The pager renders when page.lastPage is above 1. Page 1 lives at the route, later pages at <route>/page/<n>.


Oct 15, 2026 · 2 min read
Translations live in a folder per language and link by filename.
- i18n
Page 2 of 3
---
import CollectionList from '@alfadormx/blocks/composite/CollectionList.astro';
import type { CollectionListEntry } from '@alfadormx/blocks/types/collectionlist';
const entries: CollectionListEntry[] = [
{
preset: 'post',
headline: { title: 'Hello, world' },
href: '/demos/saas/blog/hello-world',
description: 'Why this library ships Markdown collections.',
date: new Date('2026-10-01T12:00:00Z'),
readingTime: 1,
tags: ['announcement'],
image: {
src: '~/assets/images/content/writing-notebook.jpg',
alt: 'A hand writing notes with a pen in a notebook on a wooden desk',
},
},
{
preset: 'post',
headline: { title: 'Writing in two languages' },
href: '/demos/saas/blog/second-post',
description: 'Translations live in a folder per language and link by filename.',
date: new Date('2026-10-15T12:00:00Z'),
readingTime: 2,
tags: ['i18n'],
image: {
src: '~/assets/images/content/dictionary-page.jpg',
alt: 'An open dictionary showing the entry for Esperanto',
},
},
];
---
<CollectionList
entries={entries}
page={{ currentPage: 2, lastPage: 3, url: { prev: '/demos/saas/blog', next: '#page-3' } }}
/>Mixed presets
Each entry picks its own card, so one list can mix presets, for example on a home page that shows the latest post, case study and event.

Example Jewellers
A 3D configurator with shareable codes for an online jeweller.
- 3d
Mar 12, 2030, 6:00 PM–8:00 PM GMT+1
New-season breads and pastries with coffee from three origins.
Olmo Café & Bakery
---
import CollectionList from '@alfadormx/blocks/composite/CollectionList.astro';
import type { CollectionListEntry } from '@alfadormx/blocks/types/collectionlist';
const mixed: CollectionListEntry[] = [
{
preset: 'post',
headline: { title: 'Hello, world' },
href: '/demos/saas/blog/hello-world',
description: 'Why this library ships Markdown collections.',
date: new Date('2026-10-01T12:00:00Z'),
readingTime: 1,
tags: ['announcement'],
image: {
src: '~/assets/images/content/writing-notebook.jpg',
alt: 'A hand writing notes with a pen in a notebook on a wooden desk',
},
},
{
preset: 'caseStudy',
client: 'Example Jewellers',
headline: { title: 'A ring configurator that sells' },
href: '/demos/portfolio/work/ring-configurator',
description: 'A 3D configurator with shareable codes for an online jeweller.',
tags: ['3d'],
},
{
preset: 'event',
headline: { title: 'Autumn tasting evening' },
href: '/demos/local/events/launch-meetup',
description: 'New-season breads and pastries with coffee from three origins.',
start: new Date('2030-03-12T17:00:00Z'),
end: new Date('2030-03-12T19:00:00Z'),
timezone: 'Europe/Madrid',
location: { name: 'Olmo Café & Bakery' },
},
];
---
<CollectionList entries={mixed} />API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| entries | CollectionListEntry[] | — | Entries in display order; each renders the card for its `preset`. |
| orientation | 'horizontal' | 'vertical' | 'horizontal' | `horizontal` lays cards in a grid; `vertical` stacks them in one column (default: 'horizontal'). |
| columns | 1 | 2 | 3 | 4 | 3 | Grid columns at the widest size; ignored when vertical (default: 3). |
| gap | 'none' | 'tight' | 'normal' | 'loose' | 'normal' | Space between cards (default: 'normal'). |
| class | string | — | Classes on the list (`data-collection-list`). |
| defaultPostCardConfig | LayerConfig<Omit<PostCardProps, 'href' | 'date'>> | — | Layer merged under every PostCard, under each entry's own values. |
| defaultCaseStudyCardConfig | LayerConfig<Omit<CaseStudyCardProps, 'href' | 'client'>> | — | Layer merged under every CaseStudyCard, under each entry's own values. |
| defaultEventCardConfig | LayerConfig<Omit<EventCardProps, 'href' | 'start' | 'end' | 'past'>> | — | Layer merged under every EventCard, under each entry's own values. |
| page | CollectionListPage | — | Page position; the pager renders when there is more than one page. |
| prevButton | Omit<ButtonProps, 'href'> | false | — | Previous-page Button; `false` hides it (default: outline, per-language "Previous"). |
| nextButton | Omit<ButtonProps, 'href'> | false | — | Next-page Button; `false` hides it (default: outline, per-language "Next"). |
| pageStatusLabel | string | — | Pager status text; `{current}` and `{last}` are replaced (default: per-language "Page {current} of {last}"). |
| pagerClass | string | — | Classes on the pager (`data-pager`). |
| langCode | string | — | Language of the pager's UI strings (default: the site's default language). |