Skip to main content
Login

Sign in to access your account

List - National Design System

A set of like items in a grid or in rows that fill, each a card that shares the list's look

Overview

A list shows a set of like items, such as services, features, courses or people, in a grid of equal columns, or in flex rows that the items grow to fill. The list is a ul with nds-grid or nds-flex, and each item is a card. An item holds any card parts: a featured icon, an image, an avatar, tags, a price or actions. Classes on the list give every item the same look: the size, the item layout (stacked or row), and either no box (nds-flat) or a card box (nds-stroke, nds-shadow).

Pick the options by what each item holds. Items can be Person (an avatar, a name, a role and a status) or Course (an image, a price, a level and an action). The layout can be Row for a long list, or Centered for three or four items. The builder and the Variants table in this page’s source list every option.

Pick another component when:

  • the item stands alone: Card
  • each item is a name and its value: Definition List
  • the items slide in a carousel: Swiper
  • each item is a navigation tile, one link: a Grid of link cards
  • each item is a page link in a column: Drawer

Markup

Options
Structure
Items
Columns (Grid)
Item width (Flex)
Layout
Size
Icons
Icon color
Lines (Grid)
Box
More
Preview
  • Apply Online

    Send the request and its documents from one form, with no office visit.

  • Track Your Request

    See each step of the review and the date of the decision.

  • Instant Alerts

    Get a text message when the request needs an action from you.

  • Secure Sign-in

    Sign in with your national digital identity.

<ul class="nds-list nds-grid nds-stroke nds-shadow" style="--max-col: 2; --min-col: 1;"> <li class="nds-card"> <div class="nds-card-header"> <div class="nds-card-featured-icon"> <span class="nds-featured-icon"><i class="hgi hgi-stroke hgi-file-edit" aria-hidden="true"></i></span> </div> </div> <div class="nds-card-content"> <div class="nds-card-text"> <span class="nds-card-title">Apply Online</span> <p class="nds-card-description">Send the request and its documents from one form, with no office visit.</p> </div> </div> </li> <li class="nds-card"> <div class="nds-card-header"> <div class="nds-card-featured-icon"> <span class="nds-featured-icon"><i class="hgi hgi-stroke hgi-clock-01" aria-hidden="true"></i></span> </div> </div> <div class="nds-card-content"> <div class="nds-card-text"> <span class="nds-card-title">Track Your Request</span> <p class="nds-card-description">See each step of the review and the date of the decision.</p> </div> </div> </li> <li class="nds-card"> <div class="nds-card-header"> <div class="nds-card-featured-icon"> <span class="nds-featured-icon"><i class="hgi hgi-stroke hgi-notification-01" aria-hidden="true"></i></span> </div> </div> <div class="nds-card-content"> <div class="nds-card-text"> <span class="nds-card-title">Instant Alerts</span> <p class="nds-card-description">Get a text message when the request needs an action from you.</p> </div> </div> </li> <li class="nds-card"> <div class="nds-card-header"> <div class="nds-card-featured-icon"> <span class="nds-featured-icon"><i class="hgi hgi-stroke hgi-square-lock-02" aria-hidden="true"></i></span> </div> </div> <div class="nds-card-content"> <div class="nds-card-text"> <span class="nds-card-title">Secure Sign-in</span> <p class="nds-card-description">Sign in with your national digital identity.</p> </div> </div> </li> </ul>

Built-in Features

  • Real Cards

    Each item is a card. Its knobs and its icon's classes still work, so one item can differ from the others.

  • Grid or Flex

    A grid list takes Grid's columns, gaps and lines. A flex list grows its items to fill each row, the last row too.

  • One Size for All Items

    nds-sm and nds-lg on the list change every part of every item together: icons, avatars, date tiles, tags, buttons, prices, numbers, text and gaps.

  • Fits Narrow Columns

    A list under 400px wide makes its icons, avatars, date tiles and gaps smaller. The text keeps its size. A size class written on the list stays as written.

  • One Look for Every Item

    One class on the list gives every item the same box and layout: flat, a border, a shadow, a row or centered.

  • Lists Inside Cards

    In a card, the items take the list's look and knobs, not the outer card's.

  • A Real List

    A screen reader announces a list and its number of items. The list shows no bullets.

Best Practices

  • Build each item as the Card page writes its parts: the header holds an icon, an image or an avatar, and the content holds the text, tags, a price and actions.
  • Keep link cards out of a list. A set of navigation tiles, each one link, is a Grid of link cards.
  • Pick Grid for equal columns, one column, rows that line up or lines between the items. Pick Flex for rows that fill, the last one too, or for one featured item. A flex list always wraps and has no lines.
  • In a grid list, set --max-col for more than one column. Without it, the items stack in one column.
  • In a flex list, a lone item in the last row takes the whole row. Set --card-width-max to stop it, and --justify: center to center the row.
  • A row list (nds-horizontal) needs wide items. An item under 324px wide puts its header back on top of the text, and an image drops under the text when it does not fit beside it. Give a row list fewer columns, or on a flex list a --card-width of about 360px, never auto.
  • On a flex list, nds-center, nds-middle and nds-reverse change the items only. To move the rows, set --justify and --align.
  • A list fills its parent’s width. In a box that sizes to its content (an inline block, a table cell), give the list a width: it measures itself to step down when narrow, so it cannot size the box.
  • Set the size, the item layout and the box on the list, so the items line up. A box class on one item mixes with the list’s: a stroke on a flat list’s item draws a border with no padding.
  • Give each icon its own look and color classes (nds-subtle, nds-green, …), so one icon can differ. An item may hold an avatar or an image instead of an icon.
  • Leave the size class off an icon, an avatar, a tag, a rating or a button: the list sizes it. An avatar is XL, LG in a small list (nds-sm) and 2XL in a large one (nds-lg). A tag or a rating is SM, XS in a small list and MD in a large one. A status tag in .nds-card-corner is the exception: it keeps nds-xs, as in a single card, so it stays small at every list size.
  • Hide every icon from screen readers with aria-hidden="true". The title names the item.
  • Put the list after a heading that says what the items are for.

API

CSS Custom Properties

These card and icon knobs set on the list reach every item. Set one on one card or icon to change that item only. The list’s classes change the defaults as the table says.

Property Default Controls
--card-bg the card’s. nds-flat: transparent Item fill
--card-padding the card’s. nds-flat: 0 Item padding
--card-text-color the card’s. nds-flat: var(--text-secondary-paragraph) Description color
--card-title-FS, --card-title-LH the card’s: --typo-text-lg-* Title size. nds-sm sets --typo-text-md-*, nds-lg sets --typo-text-xl-*
--card-description-FS, --card-description-LH the card’s: --typo-text-md-* Description size. nds-sm sets --typo-text-sm-*, nds-lg sets --typo-text-lg-*
--card-gap the card’s: var(--spacing-3xl), var(--spacing-xl) on phones Space between the icon and the text. nds-sm and a list under 400px wide set var(--spacing-lg), nds-lg sets var(--spacing-4xl)
--featuredicon-size the card’s: 48px Icon size. nds-sm and a list under 400px wide set 40px, nds-lg sets 56px

Grid List

A grid list’s columns and gaps are the grid’s knobs. One default differs: --max-col is 1, unless the list’s style writes --min-width.

Flex List

Set these on the list for every item, or on one item. --gap and --align are the flex knobs.

Property Default Controls
--card-width 320px The width an item starts at, before it grows. auto: the width of its content
--card-width-max none The widest an item grows
--grow 1 How fast an item grows. 0 keeps it at --card-width. 2 grows twice as fast as 1
--justify flex-start Where a short row sits: center or flex-end

JavaScript

List has no script of its own. With nds-divided, the grid script marks the last row, so no line shows under it.

Last Modified Date: 05/11/2026 - 09:39 PM
Was this page useful?
60% of users said Yes from 2843 Feedbacks