text.topic
Names a topic or category an item belongs to: News, Science. Sits one surface level above what holds it. A link inside it covers the whole chip; without one, a link covering its item covers the chip too
Text intents
Example
<Text intent="text.topic">Pack my box with five dozen liquor jugs.</Text>Choosing between neighbours
Find the row that describes your element, and use the intent on the right.
If it is
Use
Names a topic or category an item belongs to: News, Science. Sits one surface level above what holds it. A link inside it covers the whole chip; without one, a link covering its item covers the chip too
text.topicthis pageNaming a form field or setting
text.labelA topic or category
rather thantext.statustext.topicthis page
Connections
Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.
- Built from
For registry authors
Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: 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.labelSmall, slightly heavy type for names of things
text-sm
tone.mutedSecondary text colour, readable on every surface
text-surface-muted
text.topicNames a topic or category an item belongs to: News, Science. Sits one surface level above what holds it. A link inside it covers the whole chip; without one, a link covering its item covers the chip too
rounded-full bg-surface-hover has-[a]:relative px-2 py-0.5 text-xs [&_a]:after:absolute [&_a]:after:inset-0 [&_a]:after:rounded-full [&_a]:after:content-[''] ring-1 ring-current/15 ring-inset has-[a:hover]:ring-current/35 data-[tone=info]:bg-info/12 data-[tone=info]:text-info data-[tone=warning]:bg-warning/12 data-[tone=warning]:text-warning data-[tone=danger]:bg-destructive/12 data-[tone=danger]:text-destructive data-[profile=ui]:bg-profile-ui/12 data-[profile=ui]:text-profile-ui data-[profile=errors]:bg-profile-errors/12 data-[profile=errors]:text-profile-errors data-[profile=logs]:bg-profile-logs/12 data-[profile=logs]:text-profile-logs data-[kind=component]:bg-component/12 data-[kind=component]:text-component [&_a]:text-[color:color-mix(in_oklch,currentColor_55%,var(--foreground))] [&_a:hover]:text-[color:color-mix(in_oklch,currentColor_55%,var(--foreground))]
text-surface-muted rounded-full bg-surface-hover has-[a]:relative px-2 py-0.5 text-xs [&_a]:after:absolute [&_a]:after:inset-0 [&_a]:after:rounded-full [&_a]:after:content-[''] ring-1 ring-current/15 ring-inset has-[a:hover]:ring-current/35 data-[tone=info]:bg-info/12 data-[tone=info]:text-info data-[tone=warning]:bg-warning/12 data-[tone=warning]:text-warning data-[tone=danger]:bg-destructive/12 data-[tone=danger]:text-destructive data-[profile=ui]:bg-profile-ui/12 data-[profile=ui]:text-profile-ui data-[profile=errors]:bg-profile-errors/12 data-[profile=errors]:text-profile-errors data-[profile=logs]:bg-profile-logs/12 data-[profile=logs]:text-profile-logs data-[kind=component]:bg-component/12 data-[kind=component]:text-component [&_a]:text-[color:color-mix(in_oklch,currentColor_55%,var(--foreground))] [&_a:hover]:text-[color:color-mix(in_oklch,currentColor_55%,var(--foreground))]
'text.topic': {
kind: 'semantic',
description: 'Names a topic or category an item belongs to: News, Science. Sits one surface level above what holds it. A link inside it covers the whole chip; without one, a link covering its item covers the chip too',
refs: ['typography.label', 'tone.muted'],
binding: {
element: 'span',
classes: 'rounded-full bg-surface-hover has-[a]:relative px-2 py-0.5 text-xs [&_a]:after:absolute [&_a]:after:inset-0 [&_a]:after:rounded-full [&_a]:after:content-[\'\'] ring-1 ring-current/15 ring-inset has-[a:hover]:ring-current/35 data-[tone=info]:bg-info/12 data-[tone=info]:text-info data-[tone=warning]:bg-warning/12 data-[tone=warning]:text-warning data-[tone=danger]:bg-destructive/12 data-[tone=danger]:text-destructive data-[profile=ui]:bg-profile-ui/12 data-[profile=ui]:text-profile-ui data-[profile=errors]:bg-profile-errors/12 data-[profile=errors]:text-profile-errors data-[profile=logs]:bg-profile-logs/12 data-[profile=logs]:text-profile-logs data-[kind=component]:bg-component/12 data-[kind=component]:text-component [&_a]:text-[color:color-mix(in_oklch,currentColor_55%,var(--foreground))] [&_a:hover]:text-[color:color-mix(in_oklch,currentColor_55%,var(--foreground))]',
},
notFor: [{ context: 'naming a form field or setting', instead: 'text.label' }],
},