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

@bastianplsfix/typography

v0.1.0

Published

A semantic Text component and Tailwind CSS v4 type system: modular scale, vertical rhythm, wrapping, clamping, and OpenType utilities.

Downloads

135

Readme

@bastianplsfix/typography

A semantic Text React component and a Tailwind CSS v4 type system: rem-based modular scale with per-size line-height and letter-spacing, fluid display sizes, vertical rhythm on the spacing grid, wrapping utilities, line clamping with an overflow-aware tooltip, cap-height trimming, and OpenType features.

Install

npm install @bastianplsfix/typography

react and react-dom (18 or 19) are peer dependencies.

Setup

In your app CSS, import the type system after Tailwind and register the component for class extraction (Tailwind doesn't scan node_modules):

@import "tailwindcss";
@import "@bastianplsfix/typography/theme.css";
@source "../node_modules/@bastianplsfix/typography/dist";

theme.css is font-agnostic. If your app uses Inter as a variable font, also add the Inter-tuned defaults (fallback metrics, stylistic sets, dark-mode weight de-bloom — see the file header for what it assumes):

@import "@bastianplsfix/typography/inter.css";

Use

import { Text } from "@bastianplsfix/typography";

<Text variant="heading-1">Page title</Text>
<Text variant="body">Body copy at the reading size, pretty-wrapped.</Text>
<Text maxLines={3}>Long content clamps and reveals a tooltip on overflow…</Text>
<Text size="sm" transform="uppercase">An eyebrow with caps tracking</Text>

Semantic variants (heading-1…3, body, body-small, description, caption, label) preset the element, size, weight, and wrap; any individual prop overrides its axis. See TextProps for the full API: OpenType features, justify (logical, RTL-safe), hasTabularNumbers, trim, underline, semantic elements via as (em, strong, s, del, sup/sub with the font's real figures, headings), and more.

Tests

npm test runs a Vitest browser-mode suite (real Chromium) covering the type scale, tracking, clamping, hyphenation, sup/sub resets, feature-case composition, stack rhythm and specificity guarantees, and the truncation tooltip. Set CHROMIUM_PATH to use a pre-provisioned browser instead of npx playwright install.

The component ships with "use client" — it works in React Server Component apps out of the box.