npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@umbra.ui/typography

v0.4.0

Published

Typography components for Umbra UI

Readme

@umbra-ui/typography

Typography components and utilities for Umbra UI, based on Apple's text styles for Sonoma with Inter and JetBrains Mono font support.

Installation

This package is part of the Umbra UI monorepo and is automatically available when using @umbra-ui/core.

Font Support

This package includes embedded font files for optimal typography:

  • Inter Variable Font - Modern, highly legible sans-serif font for UI text
  • JetBrains Mono - Monospace font optimized for code and technical content

The fonts are automatically loaded when you import the typography CSS.

Usage

CSS Classes (Recommended)

Import the CSS file to get all typography classes and font loading:

import "@umbra-ui/typography/typography.css";

Then use the CSS classes in your HTML:

<!-- Regular typography with Inter font -->
<h1 class="largeTitle">Large Title</h1>
<h2 class="title1">Title 1</h2>
<h3 class="title2">Title 2</h3>
<h4 class="title3">Title 3</h4>
<p class="headline">Headline Text</p>
<p class="body">Body text for regular content</p>
<p class="callout">Callout text</p>
<p class="subheadline">Subheadline text</p>
<p class="footnote">Footnote text</p>
<p class="caption">Caption text</p>

<!-- Monospace typography with JetBrains Mono -->
<code class="body-mono">const example = "code";</code>
<pre class="caption-mono">console.log("monospace text");</pre>
<p class="headline-mono">Monospace Headline</p>

TypeScript Scale

For programmatic access to typography values:

import {
  defaultTypographyScale,
  monospaceTypographyScale,
  TypographyVariantName,
} from "@umbra-ui/typography";

// Use the default typography scale (Inter font)
const headlineStyles = defaultTypographyScale.headline;

// Use the monospace typography scale (JetBrains Mono font)
const codeStyles = monospaceTypographyScale.body;

// Type-safe typography variant names
const variant: TypographyVariantName = "headline";

API

CSS Classes

Regular Typography (Inter Font)

  • .largeTitle - Large title text (24px, bold)
  • .title1 - Title 1 text (20px, semibold)
  • .title2 - Title 2 text (16px, semibold)
  • .title3 - Title 3 text (14px, medium)
  • .headline - Headline text (13px, semibold)
  • .body - Body text (13px, regular)
  • .callout - Callout text (12px, regular)
  • .subheadline - Subheadline text (11px, regular)
  • .footnote - Footnote text (11px, regular)
  • .caption - Caption text (11px, regular)

Monospace Typography (JetBrains Mono)

  • .largeTitle-mono - Large title text (24px, semibold)
  • .title1-mono - Title 1 text (20px, medium)
  • .title2-mono - Title 2 text (16px, medium)
  • .title3-mono - Title 3 text (14px, medium)
  • .headline-mono - Headline text (13px, medium)
  • .body-mono - Body text (13px, regular)
  • .callout-mono - Callout text (12px, regular)
  • .subheadline-mono - Subheadline text (11px, regular)
  • .footnote-mono - Footnote text (11px, regular)
  • .caption-mono - Caption text (11px, regular)

Font Weight Utilities

  • .font-thin - Thin weight (100)
  • .font-light - Light weight (300)
  • .font-regular - Regular weight (400)
  • .font-medium - Medium weight (500)
  • .font-semibold - Semibold weight (600)
  • .font-bold - Bold weight (700)
  • .font-black - Black weight (900)

Text Color Utilities

  • .text-primary - Primary text color
  • .text-secondary - Secondary text color
  • .text-tertiary - Tertiary text color
  • .text-disabled - Disabled text color

Text Alignment Utilities

  • .text-left - Left alignment
  • .text-center - Center alignment
  • .text-right - Right alignment
  • .text-justify - Justified alignment

TypeScript Types

  • TypographyVariant: Interface for individual typography variants
  • TypographyScale: Interface for the complete typography scale
  • TypographyVariantName: Union type of all available variant names

Exports

  • defaultTypographyScale: Typography scale object with CSS custom properties
  • monospaceTypographyScale: Monospace typography scale object
  • All type definitions for TypeScript support
  • CSS file with all typography classes and font loading

CSS Custom Properties

The typography system uses CSS custom properties based on a base font size of 13px:

:root {
  --base-font-size: 13px;

  /* Title hierarchy - using perfect fourth scale (1.333) */
  --large-title: calc(1.846 * var(--base-font-size)); /* 24px */
  --title1: calc(1.538 * var(--base-font-size)); /* 20px */
  --title2: calc(1.231 * var(--base-font-size)); /* 16px */
  --title3: calc(1.077 * var(--base-font-size)); /* 14px */

  /* Body text styles */
  --headline: var(--base-font-size); /* 13px */
  --body: var(--base-font-size); /* 13px */
  --callout: calc(0.923 * var(--base-font-size)); /* 12px */
  --subheadline: calc(0.846 * var(--base-font-size)); /* 11px */

  /* Small text styles */
  --footnote: calc(0.846 * var(--base-font-size)); /* 11px */
  --caption: calc(0.846 * var(--base-font-size)); /* 11px */

  /* Font weights */
  --font-weight-thin: 100;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
}

Font Family

Regular Typography (Inter)

The typography system uses Inter variable font with system font fallbacks:

font-family: "Inter var", -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
  "Helvetica Neue", Helvetica, Arial, sans-serif;

Monospace Typography (JetBrains Mono)

The monospace typography uses JetBrains Mono with system monospace fallbacks:

font-family: "JetBrains Mono", "SF Mono", "Monaco", "Inconsolata",
  "Roboto Mono", "Source Code Pro", "Menlo", "DejaVu Sans Mono",
  "Liberation Mono", "Courier New", monospace;

Font Features

Inter Variable Font

  • Variable font support - Smooth weight interpolation from 100-900
  • Optical sizing - Automatically adjusts for different text sizes
  • OpenType features - Enhanced ligatures and contextual alternates
  • Optimized for screens - Designed specifically for digital interfaces

JetBrains Mono

  • Variable font support - Smooth weight interpolation from 100-800
  • Programming ligatures - Enhanced readability for code
  • Zero slashed - Distinguishes between 0 and O
  • Optimized for coding - Designed specifically for developers

Benefits of Embedded Fonts

  • Consistent appearance - Same fonts across all platforms
  • Better typography - Optimized fonts for specific use cases
  • Variable font support - Smooth weight interpolation
  • Performance optimized - Fonts are included in the package
  • No external dependencies - Self-contained typography system

Dark Mode Support

The typography system automatically adapts to dark mode:

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --text-disabled: rgba(255, 255, 255, 0.3);
    --background: #0a0a0a;
    --surface: #1a1a1a;
  }
}

Manual dark mode toggle is also supported via .dark or .dark-theme classes.

Use Cases for Monospace Typography

  • Code snippets - Inline code and code blocks
  • Data tables - Aligned columns and data display
  • Terminal output - Command line interfaces
  • Documentation - Technical specifications and examples
  • Logs and debugging - Structured text output

Typography Scale

The typography scale includes:

  • Headings: largeTitle, title1, title2, title3 with decreasing font sizes and appropriate weights
  • Body Text: headline, body, callout for main content
  • Supporting Text: subheadline, footnote, caption for secondary information

Each variant includes:

  • fontSize: CSS font-size value
  • fontWeight: CSS font-weight value
  • lineHeight: CSS line-height value
  • letterSpacing: Optional CSS letter-spacing value
  • fontFamily: CSS font-family value