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

@hensley-ui/react-heading

v0.1.1

Published

A flexible and accessible heading component built with React and Tailwind CSS

Readme

@hensley-ui/react-heading

A flexible and accessible heading component built with React and Tailwind CSS. This component provides semantic heading elements (h1-h6) with consistent styling and typography.

Installation

npm install @hensley-ui/react-heading

Note: This package depends on @hensley-ui/utils. It will be installed automatically.

Usage

import { Heading } from '@hensley-ui/react-heading'

function App() {
  return (
    <div>
      <Heading as="h1">Main Title</Heading>
      <Heading as="h2">Section Title</Heading>
      <Heading as="h3">Subsection Title</Heading>
      <Heading as="h4">Smaller Title</Heading>
      <Heading as="h5">Even Smaller Title</Heading>
      <Heading as="h6">Smallest Title</Heading>
      <Heading as="p">Paragraph text with heading styles</Heading>
    </div>
  )
}

Props

The Heading component accepts all standard HTML heading props plus:

  • as: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' - The HTML element to render
  • className: string - Additional CSS classes
  • children: ReactNode - The content to display

Default Styles

Each heading level comes with predefined Tailwind CSS classes:

  • h1: scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl
  • h2: scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0
  • h3: scroll-m-20 text-2xl font-semibold tracking-tight
  • h4: scroll-m-20 text-xl font-semibold tracking-tight
  • h5: scroll-m-20 text-lg font-semibold tracking-tight
  • h6: scroll-m-20 text-base font-semibold tracking-tight
  • p: leading-7 [&:not(:first-child)]:mt-6

Examples

Basic Usage

import { Heading } from '@hensley-ui/react-heading'

function Article() {
  return (
    <article>
      <Heading as="h1">Article Title</Heading>
      <Heading as="h2">Introduction</Heading>
      <p>Some introductory text...</p>
      <Heading as="h2">Main Content</Heading>
      <Heading as="h3">Subsection</Heading>
      <p>More content...</p>
    </article>
  )
}

Custom Styling

import { Heading } from '@hensley-ui/react-heading'

function CustomHeading() {
  return (
    <Heading
      as="h1"
      className="text-blue-600 hover:text-blue-800 transition-colors"
    >
      Custom Styled Heading
    </Heading>
  )
}

Polymorphic Component

The Heading component is polymorphic, meaning you can render it as any heading element:

import { Heading } from '@hensley-ui/react-heading'

function DynamicHeading({ level, children }) {
  return (
    <Heading as={`h${level}`}>
      {children}
    </Heading>
  )
}

// Usage
<DynamicHeading level={1}>Level 1</DynamicHeading>
<DynamicHeading level={2}>Level 2</DynamicHeading>

Dependencies

This package includes:

  • @hensley-ui/utils - For class name utilities (cn function)
  • class-variance-authority - For variant management

Peer Dependencies

  • react >= 18.0.0-rc < 20.0.0
  • @types/react >= 18.0.0-rc < 20.0.0

Accessibility

The Heading component follows accessibility best practices:

  • Uses semantic HTML elements (h1-h6)
  • Maintains proper heading hierarchy

License

MIT