Menu

Components

Tags

What kind of thing this is, as chips: TagRow for a list, KickerTags for a write-up's middle-dot kicker.

Usage

TagRow

ProductDesktopAgents

import { TagRow, KickerTags } from '@/components/ui/tag-row'

<TagRow tags={['Product', 'Desktop', 'Agents']} />

It replaced the uppercase run that used to open every write-up, three separate facts set as one sentence in the treatment hardest to read at length. As chips they are three things again, each one bounded.

Examples

KickerTags

ProductDesktopAgents

<KickerTags>Product · Desktop · Agents</KickerTags>

The same row from the kicker string a write-up already had, so each page keeps the exact facts it chose to lead with. The deck on /demo and the page it links to show one row from one component.

Tech chip

TypeScriptNext.jsTailwind
<span className="aka-card-well inline-flex items-center rounded-md px-2 py-0.5 text-11 font-medium uppercase tracking-[0.14em] text-muted-foreground">TypeScript</span>

A string, for a stack list. Uppercase and tracked like the tag, in the well, and never coloured by category.

Props

TagRow

Server component

PropDescription
tagsreadonly string[]One chip each. An empty list renders nothing.
className?stringOn the row.Default ''

KickerTags

Server component

PropDescription
childrenstringA middle-dot list, as a write-up's kicker is written.
className?stringOn the row.

Best practices

When to use

  • Facts about a thing: its kind, its platform, its year.
  • Not for filters: these label, they do not act.

Behaviour

  • Server-rendered, no state. Uppercase, tracked, in the muted ink at the floor.
  • Never coloured by category.

Accessibility

  • The row is a paragraph of words; the tag icon is aria-hidden.
  • Keep each tag a word or two, since capitals are slow to read.