ArcaneJaspr Codex
Documentation
Typography
Reference for font size, weight, family, and text styling enums
Live Demo
Font sizes
FontSize.xs - Extra small text FontSize.sm - Small text FontSize.base - Base text FontSize.lg - Large text FontSize.xl - Extra large text FontSize.xl2 - 2XL text FontSize.xl3 - 3XL text
Font weights
Normal Medium Semibold Bold
Text colors
Primary Muted Accent Success Warning Error

Typography#

These enums control text appearance including size, weight, family, and decoration.

FontSize#

Font size scale from extra small to mega display.

ValueCSS OutputUse Case
xs12pxSmall labels, captions
sm14pxSecondary text, metadata
md15pxDefault body text
base16pxStandard body text
lg18pxEmphasized text
xl20pxSubheadings
xl224pxSection headings
xl332pxPage headings
xl440pxLarge headings
xl548pxDisplay headings
hero56pxHero text
mega72pxMega display
inheritinheritInherit from parent

Usage#

ArcaneDiv(
  styles: const ArcaneStyleData(
    fontSize: FontSize.xl2,
  ),
  children: [ArcaneText('Section Heading')],
)

FontWeight#

Font weight from normal to bold.

ValueCSS OutputDescription
normal400Regular weight
w500500Medium weight
w600600Semi-bold
bold700Bold

Usage#

ArcaneSpan(
  styles: const ArcaneStyleData(
    fontWeight: FontWeight.w600,
  ),
  child: ArcaneText('Semi-bold text'),
)

FontFamily#

Font family presets.

ValueCSS OutputUse Case
sansSystem sans-serif stackBody text
headingSystem sans-serif stackHeadings
monoFira Code, JetBrains Mono, monospaceCode
inheritinheritInherit from parent

Usage#

ArcaneSpan(
  styles: const ArcaneStyleData(
    fontFamily: FontFamily.mono,
    fontSize: FontSize.sm,
  ),
  child: ArcaneText('const value = 42;'),
)

FontStyle#

Font style (italic/normal).

ValueCSS OutputDescription
normalnormalNormal style
italicitalicItalic text
obliqueobliqueOblique text

LineHeight#

Line height scale.

ValueCSS OutputDescription
none1No extra line height
tight1.1Tight spacing (headings)
snug1.25Slightly condensed
normal1.5Default body text
relaxed1.7Relaxed reading
loose2Very loose

Usage#

ArcaneParagraph(
  styles: const ArcaneStyleData(
    lineHeight: LineHeight.relaxed,
  ),
  children: [ArcaneText('Long paragraph with comfortable reading spacing...')],
)

LetterSpacing#

Letter spacing adjustments.

ValueCSS OutputDescription
tighter-0.05emVery tight
tight-0.02emSlightly tight
normal0Default spacing
wide0.05emSlightly wide
wider0.1emWide
widest0.2emVery wide

Usage#

ArcaneDiv(
  styles: const ArcaneStyleData(
    fontSize: FontSize.xs,
    letterSpacing: LetterSpacing.wide,
    textTransform: TextTransform.uppercase,
  ),
  children: [ArcaneText('SECTION LABEL')],
)

TextDecoration#

Text decoration styles.

ValueCSS OutputDescription
nonenoneNo decoration
underlineunderlineUnderlined text
overlineoverlineLine above text
lineThroughline-throughStrikethrough

Usage#

ArcaneLink(
  href: '/docs',
  styles: const ArcaneStyleData(
    textDecoration: TextDecoration.none,
  ),
  child: ArcaneText('Link without underline'),
)

TextTransform#

Text case transformation.

ValueCSS OutputDescription
nonenoneNo transformation
uppercaseuppercaseALL CAPS
lowercaselowercaseall lowercase
capitalizecapitalizeFirst Letter Caps

Usage#

ArcaneDiv(
  styles: const ArcaneStyleData(
    textTransform: TextTransform.uppercase,
  ),
  children: [ArcaneText('label')], // Renders as "LABEL"
)

WhiteSpace#

White space handling.

ValueCSS OutputDescription
normalnormalCollapse whitespace, wrap
nowrapnowrapCollapse whitespace, no wrap
preprePreserve whitespace, no wrap
preWrappre-wrapPreserve whitespace, wrap
preLine pre-line Collapse spaces, preserve newlines
breakSpacesbreak-spacesPreserve all, wrap

Usage#

ArcanePre(
  styles: const ArcaneStyleData(
    whiteSpace: WhiteSpace.pre,
    fontFamily: FontFamily.mono,
  ),
  children: [ArcaneText(codeContent)],
)

WordBreak#

Word breaking behavior.

ValueCSS OutputDescription
normalnormalDefault behavior
breakAllbreak-allBreak anywhere
keepAllkeep-allNo CJK breaks
breakWordbreak-wordBreak at word boundaries

TextColor#

Semantic text colors. See the Colors page for the full list.

Common values:

  • primary - Main text color
  • secondary - Secondary text
  • muted - Muted/disabled text
  • accent - Accent color text
  • success - Success text
  • warning - Warning text
  • error - Error text

Usage#

ArcaneText(
  'Important message',
  styles: const ArcaneStyleData(
    textColor: TextColor.accent,
    fontWeight: FontWeight.w600,
  ),
)

Common Typography Patterns#

Page Heading#

ArcaneDiv(
  styles: const ArcaneStyleData(
    fontSize: FontSize.xl3,
    fontWeight: FontWeight.bold,
    lineHeight: LineHeight.tight,
    textColor: TextColor.primary,
    margin: MarginPreset.bottomLg,
  ),
  children: [ArcaneText('Page Title')],
)

Section Label#

ArcaneDiv(
  styles: const ArcaneStyleData(
    fontSize: FontSize.xs,
    fontWeight: FontWeight.w600,
    textTransform: TextTransform.uppercase,
    letterSpacing: LetterSpacing.wide,
    textColor: TextColor.muted,
    margin: MarginPreset.bottomSm,
  ),
  children: [ArcaneText('Section')],
)

Muted Caption#

ArcaneDiv(
  styles: const ArcaneStyleData(
    fontSize: FontSize.sm,
    textColor: TextColor.muted,
  ),
  children: [ArcaneText('Last updated 2 hours ago')],
)

Code Inline#

ArcaneSpan(
  styles: const ArcaneStyleData(
    fontFamily: FontFamily.mono,
    fontSize: FontSize.sm,
    raw: {
      'padding': '2px 6px',
      'background': 'var(--code-background)',
      'border-radius': '4px',
    },
  ),
  child: ArcaneText('npm install'),
)