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

@fredybustos/react-tabs

v1.1.1

Published

React tabs library

Readme

Tabs Component

NPM Version

This React library offers a fully customizable, dynamic tab system that allows developers to easily integrate multi-view content navigation into their applications. Designed for versatility and ease of use, this tab component can seamlessly fit into any project, whether you're building a dashboard, a user profile, or a data-driven application.

Installation

To install the tabs component, run the following command:

  npm install @fredybustos/react-tabs
  or
  yarn add @fredybustos/react-tabs

Import css file

To ensure that the tab styles are applied correctly, you need to import the generated CSS file tabs.min.css. Depending on your working environment, you can do this in the following ways:

In your React project, add the following import statement to your index.js file, before importing your project's CSS:

import '@fredybustos/react-tabs/dist/esm/tabs.min.css';

Usage

This is how you can set up a simple tab content. The active tab will be highlighted automatically, and users can switch between the sections seamlessly.

Import the Tabs component and render it with Tab components as children:

import React from 'react';
import { Tabs, Tab } from '@fredybustos/react-tabs'

const App = () => {
  const handleSelect = ({ index, element }) => {
    console.log(`Selected tab ${index} with title ${element.title}`);
  };

  return (
    <Tabs onSelect={handleSelect}>
      <Tab title="Tab 1">
        Content of Tab 1
      </Tab>
      <Tab
        icon={<CommentIcon sx={{ mr: 2 }} />}
        title="Tab 2"
      >
        Content of Tab 2
      </Tab>
      <Tab
        disabled
        title="Tab 3"
      >
        Content of Tab 3
      </Tab>
    </Tabs>
  );
};

Tab properties

type Styles = {
  style: React.CSSProperties
  className: string
}

| Prop Name | Type | Default Value | Description | |:----------- |:------- |:--------------- |:------------- | | title | React.ReactElement | string | Title to display in table header | | active | boolean | boolean | Whether the tab is active | | testId | string | tab-testid | Test ID for testing purposes | | disabled | boolean | false | Whether the tab is disabled | | hideTab | boolean | false | Whether to hide the tab | | className | string | tab | Additional class name | | iconRight | boolean | false | Whether to put icon right | | style | React.CSSProperties | | Custom styles | | children | React.ReactNode - string | | Tab information for rendering |

Tabs properties

| Prop Name | Type | Default Value | Description | |:----------- |:------- |:--------------- |:------------- | | children | React.ReactNode - string | Tabs information for rendering | | className | string | tabs-ctn | Additional class name | | style | React.CSSProperties | | Custom styles| | activeStyles | Styles | | Custom active styles| | onSelect | ({ index: number; element: TabProps }) => void | | Callback function when a tab is selected|

License

This project is licensed under the MIT LICENSE. See the file for details.

Contributing

Contributions are welcome! Please submit a pull request with your changes.