Legacy component

Use a list block instead: it works in plain Markdown, renders on the server and resolves authors. The table in Coming from the List component translates every prop.

Important

Using the List component requires MDX rendering, since it uses JSX (like <List />). Make sure to switch to MDX rendering for this page by changing its extension to .mdx (if you're using "auto" syntax mode) or by adding syntaxMode: mdx in the frontmatter. πŸ“š Read more about different syntax rendering modes and how to enable them: https://flowershow.app/blog/announcing-syntax-mode-configuration

Basic example

<List dir="/blog"/>

The List component will display all the markdown files in the specified directory. By default, it shows the title as the headline and the description as the summary.

Properties

The List component accepts the following props:

  • dir (optional) Directory (relative to site root) to list items from.
    Default: "" (root folder)
    Type: string

  • slots (optional) Lets you decide what information should appear in each part of the list item.

    Available slots:

    • media β†’ usually an image
    • eyebrow β†’ small text shown above the title (for example, a date)
    • headline β†’ the main title
    • summary β†’ a short description
    • footnote β†’ small text shown below (for example, authors)

    Each slot can be connected to a field from your page’s frontmatter (like title, description, date, authors, image).

    Default:

    {
      headline: "title",
      summary: "description"
    }
    
  • pageSize (optional)
    Number of items per page for pagination. If not provided, all items are shown without pagination. Type: number

Example:

<List
dir="/blog"
slots={{
    headline: "title",
    summary: "description",
    eyebrow: "date",
    footnote: "authors",
    media: "image"
  }}
pageSize={5}
/>

πŸ‘‰ Check it out in our interactive documentation: https://components.flowershow.app/?path=/docs/other-list–docs

Behavior

The List component:

  • Ignores README.md and index.md files
  • Is recursive (includes files in subdirectories)
  • Sorts by date if available, otherwise by title

Styling

The List component renders stable CSS classes you can target from custom.css or a theme:

ClassElement
.list-componentThe whole list
.list-component-itemOne card
.list-component-item-mediaThe image area (media slot)
.list-component-item-media-linkThe link around the image
.list-component-item-contentThe text column
.list-component-item-eyebrowThe eyebrow slot
.list-component-item-headlineThe headline slot (an h3)
.list-component-item-headline-linkThe link inside the headline
.list-component-item-summaryThe summary slot
.list-component-item-footnoteThe footnote slot
.list-component-paginationPage controls (when pageSize is set)
.list-component-emptyThe "No items found" message
.list-component-errorThe message shown when items fail to load

For example, to make the whole card clickable rather than only the headline:

.list-component-item-headline-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

This works because each .list-component-item is already position: relative. The overlay sits above everything else in the card, so any other links in it (for example in the summary or footnote) stop being clickable. Lift them above the overlay:

.list-component-item a:not(.list-component-item-headline-link) {
  position: relative;
  z-index: 1;
}

The full list, including loading skeleton and pagination classes, is in the theme class reference.

Info

For a detailed guide including examples and step-by-step instructions, see the content catalogs guide.

Built with LogoFlowershow