Skip to content

Machine-translated – improvements welcome. Suggest an improvement

Tile

Kachel is a way with a number – the same on the start page of the filing area and on the workbench overview (#1271, #1284). Background like the content, border, the title at the top, the number large in the accent colour, a quiet line below. The whole tile is a link. Several tiles stand in Kacheln, a grid; below about 420 px width each tile becomes a row (title left, number right).

What it is for

For an overview that is a way at the same time: “To do 3” leads to To do. A number after a navigation entry is a Number; an action is a button. Notes and warnings do not go into a tile but below it as a note (Note in the overview).

Matching patterns in the pattern catalogue: C8 · A link goes somewhere else, a button does something, B8 · Note in the overview, D3 · Sentences that are true.

How to use it

With How it works
Mouse A click anywhere on the tile opens its target; on hover the border turns blue.
Keyboard Tab reaches every tile as one link; Enter opens it.
Touch The whole tile is the touch target; on a narrow screen every tile is a row across the full width.

What it means

Rules: tiles are neutral; only the number carries colour. Green means “good” – an empty area without a task (no favourites) stays quiet. Notes and warnings do not go into a tile but below it as a note (workbench overview).

For the person this means: blue number – that's how many, a click leads there. Green with a tick – empty, and that is good (“Nothing to do”); this only exists where empty means “done” (To do, New post). Quiet sentence instead of 0 – empty, but no success. “…” – still loading.

States

State How it comes about How it looks
with a number wert large number in --akzent, unter quietly below
empty and done wert={0}, leer, leerGut green with a tick and the sentence from leer
empty without success wert={0}, leer sentence from leer, quiet
loading wert={null} “…” quiet
text wert as text (date, version) like a number
mouse over – border --akzent
keyboard focus – 2 px ring in --akzent with offset
narrow below about 420 px one row: title left, number right

“Tile” section of the pattern page: with number, empty and done, empty without success, loading, text

“Tile” section, dark

Accessibility

The tile is a single link; title, number and the lines below are read in this order. “Done” doesn't rely on the green colour alone: the tick and the sentence say it, too. The focus is visible in light and dark.

Code

import { Kachel, Kacheln } from '../bausteine';

<Kacheln>
  <Kachel name="eingang" to="/ablage/eingang" titel={t('ablage.startseite.zu-erledigen')} wert={zahl}
    leer={t('ablage.startseite.nichts-zu-erledigen')} leerGut />          // 0: green with tick – done
  <Kachel name="wahl" to="/ablage/favoriten" titel={t('ablage.startseite.favoriten')} wert={favoriten}
    leer={t('ablage.startseite.noch-keine-der-stern')} />                // 0: quiet – empty is no success
  <Kachel to="/werkbank/systemzustand#version" titel={t('werkbank.uebersicht.version')} wert={version} unter={…} />
</Kacheln>
Property Meaning
to target of the tile
titel title at the top (also with a symbol)
wert number (written in the locale) or short text (date, version); null = still loading, “…”
leer, leerGut text instead of 0; with leerGut green with a tick – only when empty means “done” (To do, New post)
unter, zusatz quiet lines below; unter is left out at 0 with leer
name, anker data-kachel (fixed key, #421) and data-anker (tours)
vorher runs before the way (date tile: choose the “Month” view)

Files and tests

  • Component: web/src/bausteine/kachel/Kachel.tsx, appearance: Kachel.module.css
  • Pattern page: web/src/bausteine/kachel/muster.tsx
  • Test: web/test/baustein-etikett.test.ts