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

humanetype

v1.1.4

Published

React component library for adding natural, humanized variations to text

Readme

Humane

Poem

A React component library for adding natural, humanized variations to text. Inspired by the InDesign "Humane Type" plugin, this library allows you to create text with subtle imperfections that make it appear more hand-crafted and less mechanical.

npm license

Installation

npm install humanetype
# or
yarn add humanetype
# or
pnpm add humanetype

Features

  • Title Text Effects: Apply subtle character-by-character variations to create naturally imperfect titles
  • Body Text Effects: Transform paragraphs by placing text on curved paths
  • Newline Support: Properly handles paragraph breaks and line breaks within text
  • Customizable: Control the intensity of all effects
  • Accessibility: Maintains text selection and screen reader compatibility
  • TypeScript Support: Fully typed component props

Usage

Basic Example

import { HumaneTitle, HumaneBody } from 'humanetype';
import 'humanetype/style.css';

function MyComponent() {
  return (
    <div>
      <HumaneTitle>This is a humanized title</HumaneTitle>
      
      <HumaneBody>
        This is a paragraph with humanizing effects applied to make the 
        text look more natural and hand-written.
      </HumaneBody>
    </div>
  );
}

Title Text Options

The HumaneTitle component applies subtle variations to each character:

<HumaneTitle 
  options={{
    rotationVariation: 3,    // Controls character rotation (0-15)
    baselineVariation: 1,    // Controls up/down position (0-5)
    trackingVariation: 100,  // Controls letter spacing (0-300)
    sizeVariation: 0,        // Controls size variation (0-300)
  }}
>
  Humanized Heading Text
</HumaneTitle>

Body Text Options

The HumaneBody component places text on a curved path:

<HumaneBody 
  options={{
    curveIntensity: 15,        // Controls the curve amount (0-45)
    horizontalVariation: 5,    // Controls left/right variation (0-45)
    verticalVariation: 3,      // Controls up/down variation (0-30)
  }}
>
  This paragraph will follow a gentle curved path with slight
  variations to create a more natural, human feel.
</HumaneBody>

Working with Paragraphs and Line Breaks

The library supports both paragraph breaks (double newlines) and line breaks (single newlines):

<HumaneBody>
  This is the first paragraph.
  
  This is a second paragraph after a double newline.
  
  Each paragraph gets its own styling and spacing.
</HumaneBody>

<HumaneBody>
  This paragraph has a line break.
  {'\n'}
  This continues on a new line but within the same paragraph.
</HumaneBody>

In titles, you can also use newlines to create multi-line titles:

<HumaneTitle>
  Title with a line break
  {'\n'}
  on two lines
</HumaneTitle>

Customizing HTML Element

You can specify which HTML element to use with the as prop:

<HumaneTitle as="h1">Main Heading</HumaneTitle>
<HumaneTitle as="h2">Subheading</HumaneTitle>
<HumaneBody as="div">Block of text</HumaneBody>

Using the Base Component

For more control, you can use the base HumaneType component:

import { HumaneType } from 'humanetype';

<HumaneType 
  mode="title"
  titleOptions={{
    rotationVariation: 2,
    baselineVariation: 1,
    trackingVariation: 80,
    sizeVariation: 10,
  }}
  as="blockquote"
>
  A custom blockquote with title-style humanization
</HumaneType>

Interactive Demo

The package includes an interactive demo that allows you to experiment with different settings for both title and body text effects. Simply run:

pnpm dev

Demo Features

  • Sliders for adjusting all effect parameters in real-time
  • Copy buttons to copy your current settings to the clipboard, making it easy to use them in your own code
  • Live preview of how the effects look with your current settings

Development

To build the library:

pnpm build

Credits

This library is inspired by the InDesign "Humane Type" plugin. The original plugin concept has been adapted to work as a React component for web applications.

License

This project is licensed under the Creative Commons Attribution 4.0 International License (CC-BY-4.0).

The original InDesign "Humane Type" plugin that inspired this library is also licensed under the Creative Commons Attribution 4.0 International License.