prongs
GitHub

text.topic

Names a topic or category an item belongs to: News, Science

Component

Renders

<span>

Profile

Comes from

Read https://www.prongs.dev/docs/intents/text/topic.md and tell me whether text.topic fits what I am building.

Example

Preview
Engineering

How we ship every week

<Text intent="text.topic">{post.category}</Text>
<Text intent="heading.item">{post.title}</Text>

Connections

Choosing between neighbours

  • If it is

    Use

  • Names a topic or category an item belongs to: News, Science

    text.topic
  • Naming a form field or setting

    text.label

For registry authors

Pack intent. prongs add editorial puts the editorial pack’s intents in your registry. They are then yours like the starter intents: rename, restyle and add to them, and see them with prongs add gallery.

What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.

How text.topic resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

  • typography.label

    Small, slightly heavy type for names of things

    text-sm font-medium
  • tone.muted

    Secondary text colour, readable on every surface

    text-surface-muted
  • surface.sunken

    Recess cut into what it sits in

    surface-inset rounded-lg
  • text.topic

    Names a topic or category an item belongs to: News, Science

    rounded-full px-2 py-0.5 text-xs
Final classes
font-medium text-surface-muted surface-inset rounded-full px-2
py-0.5 text-xs
Definition
TS
'text.topic': {
kind: 'semantic',
description: 'Names a topic or category an item belongs to: News, Science',
refs: ['typography.label', 'tone.muted', 'surface.sunken'],
binding: { element: 'span', classes: 'rounded-full px-2 py-0.5 text-xs' },
notFor: [{ context: 'naming a form field or setting', instead: 'text.label' }],
},