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

stng-react

v2.0.0

Published

A React component library with SButton and SCard components

Downloads

1

Readme

Stng-react

A modern React component library built with TypeScript and styled with Tailwind CSS, featuring beautifully designed and accessible UI components.

Installation

npm install stng-react

Requirements

  • React 18.0.0 or higher
  • React DOM 18.0.0 or higher

Styling

This library uses Tailwind CSS for styling. The compiled CSS is automatically included when you import components, so you don't need to install Tailwind CSS separately in your project unless you want to extend or customize the styles.

If you're already using Tailwind CSS in your project, the components will seamlessly integrate with your existing Tailwind setup.

Components

SButton

A flexible button component with multiple variants and sizes, styled with Tailwind CSS.

import { SButton } from "stng-react";

function App() {
  return (
    <div>
      <SButton
        variant="primary"
        size="medium"
        onClick={() => console.log("Clicked!")}
      >
        Click me
      </SButton>
      <SButton variant="secondary" size="large">
        Secondary Button
      </SButton>
      <SButton variant="danger" size="small" disabled>
        Disabled Button
      </SButton>
      <SButton variant="success" size="medium">
        Success Button
      </SButton>
    </div>
  );
}

Props

  • children: React.ReactNode - Button content
  • variant: 'primary' | 'secondary' | 'danger' | 'success' - Button style variant
  • size: 'small' | 'medium' | 'large' - Button size
  • disabled: boolean - Whether the button is disabled
  • onClick: (event: React.MouseEvent) => void - Click handler
  • type: 'button' | 'submit' | 'reset' - Button type
  • className: string - Additional Tailwind CSS classes

SCard

A versatile card component for displaying content in a structured layout, built with Tailwind CSS utility classes.

import { SCard } from "stng-react";

function App() {
  return (
    <div>
      <SCard
        title="Card Title"
        subtitle="Card subtitle"
        variant="elevated"
        padding="medium"
      >
        <p>This is the card content.</p>
      </SCard>

      <SCard
        variant="outlined"
        padding="large"
        header={<div>Custom Header</div>}
        footer={<div>Custom Footer</div>}
      >
        <p>Card with custom header and footer.</p>
      </SCard>
    </div>
  );
}

Props

  • children: React.ReactNode - Card content
  • title: string - Card title
  • subtitle: string - Card subtitle
  • variant: 'default' | 'outlined' | 'elevated' - Card style variant
  • padding: 'none' | 'small' | 'medium' | 'large' - Card padding
  • className: string - Additional Tailwind CSS classes
  • onClick: (event: React.MouseEvent) => void - Click handler
  • header: React.ReactNode - Custom header content
  • footer: React.ReactNode - Custom footer content

Customization

Since the components are built with Tailwind CSS, you can easily customize them by:

  1. Adding custom classes: Use the className prop to add additional Tailwind classes
  2. Extending with your own Tailwind config: If you're using Tailwind in your project, you can extend the default theme
  3. CSS-in-JS integration: The Tailwind classes work well with CSS-in-JS libraries

Example of customization:

<SButton
  variant="primary"
  className="shadow-xl transform hover:scale-105 transition-transform"
>
  Custom Styled Button
</SButton>

TypeScript Support

This library is built with TypeScript and includes complete type definitions for all components and their props.

License

MIT