Article list

A row per article: date and tag on the left, title and a line on the right. Drafts are marked for the build to catch.

Features

  • Date (or a Draft badge) and a tag on the left, title and a line on the right; one column when narrow.
  • Drafts are marked with a data attribute, so a production check can refuse to ship one.
  • No state: renders on the server.

Use it for

  • A blog index, notes, release posts.

On this site

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react
  4. Load the styles once. Bring your own base tokens, or use runets’ default theme.
    import 'runets/styles/theme.css'
    import 'runets/styles/kit.css'

API

PropTypeWhat it does
items{ href, title, description, date?, tag?, dark?, draft? }[]dark puts the tag on the dark side of the palette.
level2 | 3Heading level of the titles.

Accessibility

Source

The code is in src/kit/article-list.tsx in runets, MIT licensed.