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

teo-ui

v2.2.0

Published

`teo-ui` is a lightweight and customizable React component library built with TypeScript. It provides a set of common UI components that can be easily styled globally using a theme provider or individually via props.

Downloads

9

Readme

teo-ui

teo-ui is a lightweight and customizable React component library built with TypeScript. It provides a set of common UI components that can be easily styled globally using a theme provider or individually via props.

Installation

To install the library, run the following command in your project's directory:

npm install teo-ui

Note: This library has react and react-dom as peer dependencies. You should have them already installed in your project.

Quick Start

Here's a simple example of how to import and use a component:

import React from 'react';
import { Button } from 'teo-ui';

function App() {
  return (
    <div>
      <Button onClick={() => alert('Button clicked!')}>
        Click Me
      </Button>
    </div>
  );
}

export default App;

Theming (Global Styling)

The library uses React's Context API to allow for global theming. You can wrap your application with the ThemeProvider to pass a custom theme object that will be applied to all components.

1. Define your custom theme

Create a theme object. You can import the defaultTheme to extend it. The theme object has the following structure:

interface Theme {
  colors: {
    primary: string;
    secondary: string;
    accent: string;
    background: string;
    text: string;
    primaryText: string; // Text color for components with a primary background
  };
  fonts: {
    body: string;
    heading: string;
  };
}

Example of a custom theme:

// theme.js
import { defaultTheme } from 'teo-ui';

export const myTheme = {
  ...defaultTheme,
  colors: {
    ...defaultTheme.colors,
    primary: 'darkblue',
    secondary: 'lightblue',
    text: '#2c3e50',
    primaryText: '#ffffff',
  },
  fonts: {
    ...defaultTheme.fonts,
    body: 'Roboto, sans-serif',
    heading: 'Montserrat, sans-serif',
  },
};

2. Wrap your application with ThemeProvider

In your main application file (e.g., App.js or index.js), import the ThemeProvider and your custom theme, then wrap your root component.

// App.js
import React from 'react';
import { ThemeProvider, Button, Navbar } from 'teo-ui';
import { myTheme } from './theme';

function App() {
  return (
    <ThemeProvider theme={myTheme}>
      <Navbar />
      <main style={{ padding: '2rem' }}>
        <h1>Welcome to My App</h1>
        <p>This is a paragraph styled with the body font.</p>
        <Button>Themed Button</Button>
      </main>
    </ThemeProvider>
  );
}

export default App;

Component API

Button

A standard button component.

| Prop | Type | Default | Description | | --------- | --------------------- | ----------- | ------------------------------------------------ | | children| React.ReactNode | - | The content to display inside the button. | | onClick | () => void | - | Function to call when the button is clicked. | | style | React.CSSProperties | {} | Custom CSS styles to apply to the button element.|

Navbar

A responsive navigation bar.

| Prop | Type | Default | Description | | --------------- | ----------------------------------- | -------------- | ---------------------------------------------------- | | logoText | string | 'Mundo Nuevo'| The text to display as the logo. | | navLinks | Array<{ text: string, href: string }> | (pre-defined) | An array of link objects for the navigation. | | buttonText | string | 'Get Started'| The text for the call-to-action button. | | onButtonClick | () => void | - | Function to call when the CTA button is clicked. | | style | React.CSSProperties | {} | Custom styles for the main nav container. | | logoStyle | React.CSSProperties | {} | Custom styles for the logo element. | | linkStyle | React.CSSProperties | {} | Custom styles for the navigation link elements. | | buttonStyle | React.CSSProperties | {} | Custom styles for the CTA Button component. |

Card

A card component with a background image, title, and button.

| Prop | Type | Default | Description | | --------------- | --------------------- | ------------- | ---------------------------------------------------- | | imageUrl | string | - | Required. The URL for the card's background image. | | title | string | - | Required. The title text to display on the card. | | buttonText | string | 'Ver más' | The text for the button inside the card. | | onButtonClick | () => void | - | Function to call when the card's button is clicked. | | style | React.CSSProperties | {} | Custom styles for the main card container. | | titleStyle | React.CSSProperties | {} | Custom styles for the title element. | | buttonStyle | React.CSSProperties | {} | Custom styles for the Button component. |

TestimonialCard

A card for displaying user testimonials.

| Prop | Type | Default | Description | | ------------- | --------------------- | ------- | ---------------------------------------------------- | | testimonial | string | - | Required. The main text of the testimonial. | | avatarUrl | string | - | Required. The URL for the user's avatar image. | | name | string | - | Required. The name of the person giving the testimonial. | | role | string | - | Required. The role or title of the person. | | style | React.CSSProperties | {} | Custom styles for the main card container. | | textStyle | React.CSSProperties | {} | Custom styles for the testimonial text. | | nameStyle | React.CSSProperties | {} | Custom styles for the name element. | | roleStyle | React.CSSProperties | {} | Custom styles for the role element. |

Development

To run the Storybook development server and see the components in action, use:

npm run dev