Textjsp
Applies a text style as a set.
Layout and type- Install
- npx shadcn add @jsp/text
- Import from
- @/components/text
- Guidance
- draft · v0.1.0
Examples
Written in jsp-ds token utilities.
Display
Heading 2
A lead paragraph.
Body text, the default.
A caption.
Overline
Guidance
When to use
- For any text outside a shadcn component: headings, body copy, captions, labels.
Rules
- Pick a style by role, not size:
heading-2for a section heading,body-mdfor copy,captionfor metadata. - The element follows the style (
heading-2is anh2); override it withasto keep the heading order right – the order matters more than the look. - Colour by role:
default,subtlefor secondary text,link(always underlined),disabled. - Never set a font size, weight or line height directly – the style is a set.
Install
Terminal
npx shadcn add @jsp/textImport
import { Text } from "@/components/text"