Default Tokens
Typewriting Class ships with Tailwind CSS-compatible design tokens. Most utilities accept Tailwind-style string lookups directly (tw.bg('blue-500')), so you often do not need to import tokens at all.
Colors
Section titled “Colors”22 color palettes with shades 50-950, plus white, black, transparent, currentColor.
// String lookups (preferred)tw.bg('blue-500')tw.textColor('slate-900')
// Or import tokens directlyimport { blue, slate } from 'typewritingclass/theme/colors'tw.bg(blue[500])Palettes: slate, gray, zinc, neutral, stone, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
Spacing
Section titled “Spacing”Numeric values map to the spacing scale automatically: 4 = 1rem, each unit = 0.25rem.
tw.p(4) // 1remtw.p(8) // 2remtw.p(0.5) // 0.125remTypography
Section titled “Typography”Text sizes require an import:
import { lg, _2xl } from 'typewritingclass/theme/typography'
tw.text(lg) // font-size: 1.125rem; line-height: 1.75remtw.text(_2xl) // font-size: 1.5rem; line-height: 2remFont weights use string lookups:
tw.font('700') // font-weight: 700tw.font('semibold') // font-weight: 600Shadows, borders, sizes
Section titled “Shadows, borders, sizes”tw.shadow('md') // string lookuptw.shadow('lg')tw.rounded('lg') // string lookuptw.rounded('full')tw.w('100%')tw.h('100vh')Import reference
Section titled “Import reference”| Subpath | Key Exports |
|---|---|
typewritingclass/theme/colors | Color palettes + white, black, transparent, currentColor |
typewritingclass/theme/typography | xs, sm, base, lg, xl, _2xl-_9xl, thin-extrabold |
typewritingclass/theme/shadows | sm, DEFAULT, md, lg, xl, _2xl, inner, none |
typewritingclass/theme/borders | none, sm, DEFAULT, md, lg, xl, _2xl, _3xl, full |
typewritingclass/theme/sizes | full, screen, screenH, min, max, fit, auto |
typewritingclass/theme/animations | Animation keyframe presets |
typewritingclass/theme/filters | Filter presets |
typewritingclass/theme | All theme token exports (barrel) |