text.excerpt
A short extract of a longer text, shown as a preview: an article summary
Read https://www.prongs.dev/docs/intents/text/excerpt.md and tell me whether text.excerpt fits what I am building.Text intents
Example
The case for fewer intents
We rebuilt twelve pages from six open-source apps with three vocabularies. The smallest covered as much as the largest, and agents agreed on it just as often.
<Text intent="heading.item">{post.title}</Text>
<Text intent="text.excerpt">{post.summary}</Text>Connections
Choosing between neighbours
If it is
Use
A short extract of a longer text, shown as a preview: an article summary
text.excerptThe full text
text.body
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.excerpt 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.smallSmall reading type
text-sm leading-6
tone.mutedSecondary text colour, readable on every surface
text-surface-muted
text.excerptA short extract of a longer text, shown as a preview: an article summary
line-clamp-2
text-sm leading-6 text-surface-muted line-clamp-2
'text.excerpt': {
kind: 'semantic',
description: 'A short extract of a longer text, shown as a preview: an article summary',
refs: ['typography.small', 'tone.muted'],
binding: { element: 'p', classes: 'line-clamp-2' },
notFor: [{ context: 'the full text', instead: 'text.body' }],
},