Rost

← All components

component

ListRow

One line in a list you read, not pick: something small at the start, a title over a line of detail, a value at the end, a line under it. For a list of payments, deadlines or files.

In code Contract: review Guidance: proposed Contract on GitHub Figma 935:58 As markdown
  • Tax15 January 2027Income tax, fourth quarter€1,240
ListRow

Install

npx github:Runceanu/rost add list-row

It lands in src/rost/list-row/, with what it needs and its contract. Install has the rest.

When to use

  • A list of things to read

    Payments coming up, deadlines, files. Each row has a title, maybe a line of detail and a value at the end.

When not to use

Behaviour

Nothing to press. On a narrow screen the title wraps and the value stays on its line at the end.

Accessibility

  • Element

    <li> in a <ul>, so a screen reader says how many rows there are.

  • Colour

    Title and value are 17:1 on the dark page, the description 7:1. In light the description is 5.4:1.

Content

The title is the thing people scan for, often a date. Keep the description to one line. Format the value for the reader, with its currency.

Props

PropTypeValuesDefault
title slot
description slot
leading slot
trailing slot

Values

Straight from the contract. Each value sits next to its token, because six tokens here all come out as #3a3a3a and the colour alone can't tell you which one is right.

Never changes

root

  • gap 24px spacing/gap/large
  • padding-top 12px spacing/gap/small-medium
  • padding-bottom 12px spacing/gap/small-medium
  • border-bottom-width 1px spacing/outline/small
  • border-bottom-color #282828 list-row/divider
  • font-family 'General Sans Variable' font-family/base
  • font-size 16px typography/body/font-size
  • line-height 22px typography/body/line-height
  • letter-spacing 0px typography/body/letter-spacing

displayflex · align-itemscenter · border-bottom-stylesolid · list-stylenone

leading

displayflex · flexnone

text

displayflex · flex-directioncolumn · flex1 1 0 · min-width0px

title

  • gap 8px spacing/gap/small
  • font-weight 500 typography/body/font-weight/medium
  • color #ededed list-row/title

displayflex · flex-wrapwrap · align-itemscenter

description

  • font-weight 400 typography/body/font-weight/regular
  • color #999999 list-row/description

trailing

  • font-weight 500 typography/body/font-weight/medium
  • color #ededed list-row/trailing

flexnone · text-alignright · white-spacenowrap