Design System

Design System

Post Item

Content

Overview

One entry in the blog index, set inside PostList (an ol whose entries are numbered by a CSS counter). Meta line, linked title, description, then a "Read more" link.

Live example

  1. 7 minutes read

    Learn how to build a disclosure component using the native HTML details tag

    A step-by-step guide to developing an expandable/collapsible component in a easy and quick way without the need to use JavaScript or WAI-ARIA, just using the HTML tag <details>. Natively, this tag will allow us to create an accessible disclosure element for sreen readers and keyboard. Finally, we are going to learn how to implement transitions with CSS.

    Read more

Usage

  • The meta line is meta in accent: the date, a square dot, the reading time. Pass the date already formatted for the locale. dateTime is the machine-readable one.
  • The number sits in the left gutter (01, 02) and is spoken as "1." through CSS alt text. Do not draw it as a pseudo-element on the list item or as text.
  • The title is a card-title (1.5rem, 2.25rem from md), underlined 3px on hover. The description is muted-foreground.
  • The "Read more" link is link-brut in mono capitals. Give it the post's title in an aria-label so repeated links have distinct names.
  • Entries are separated by a 2px border line, with space-10 (space-12 from md) above and below each.

Accessibility

This section is still in progress.

Related

This section is still in progress.

References

This section is still in progress.

On this page