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

space-react-components

v1.1.3

Published

Library of components made with tailwind and typescript

Downloads

30

Readme

Logo

Space React Components

SRC is a library created by Zeety especially for Space Academic. The library integrates Typescript and React, for building custom components focused on the needs of the project. However, we expect SRC to be a 100% usable library for external audiences.

Features

  • Components built with typescript and tailwind
  • Works with any React framework
  • NextJS support
  • Responsive design

Installation

Install Space React Components with npm

  npm install space-react-components

Components

Below you will find the list of components that currently have the library

Avatar

The Avatar component allows the user to add information from the current system session.

Avatar Screenshot

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | username | string | Required. Name of current user | | image | string | Optional. URL of the profile image |

By default the system will take the initial of the username in case of not having an image

Usage/Examples

import { Avatar } from 'space-react-components'

function App() {
  return (
    <>
      ...Your component code
      <Avatar image="https://userimage.png" username="Sara López" />
    </>
  )
}

Header

The Header component allows the user to group the basic information of the system (Logo) and additionally the Avatar component is already integrated.

It also has a button that allows the display of the side menu in its mobile version, all this thanks to the useMenu hook itself.

Header Screenshot

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | logo | string | Required. Main logo showing the component | | logoAlt | string | Required. Alternate text for the main logo | | otherLogo | string | Optional. Secondary logo URL | | otherLogoAlt | string | Optional. Alternate text for the secondary logo | | otherLogoMobile | string | Optional. URL of the mobile version of the secondary logo | | imageAvatar | string | Optional. URL of the profile image | | usernameAvatar | string | Required. Name of current user | | toggleMenu | MouseEventHandler | Required. useMenu function enabling menu activation in the mobile version | | className | string | Optional. List of classes for component customization | | style | CSSProperties | Optional. Styles for component customization |

Usage/Examples

Basic usage

import { Header } from 'space-react-components'

function App() {
  return (
    <>
      ...Your component code
      <Header 
        logo="https://logo_space.png" 
        logoAlt="Space Academic"
        toggleMenu={onToggleMenu}
        className="header-area"
        usernameAvatar="Sara López" />
    </>
  )
}

Main Navigation

The MainNav component allows the user to have a main navigation bar, which can complement the Header component.

Header Screenshot

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | className | string | Optional. List of classes for component customization | | style | CSSProperties | Optional. Styles for component customization | | menu | MainNavItemTypes[] | Required. List of menu items |

MainNavItemTypes

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | label | string | Required. Item title | | url | string | Required. Item destination URL | | icon | JSX.Element | Required. JSX element for sample icon |

Usage/Examples

Basic usage

import { Header, MainNav } from 'space-react-components'
import { ChartPieIcon, ClipboardDocumentListIcon } from '@heroicons/react/24/outline'
-----
import { MainNavItemTypes } from "space-react-components/dist/components/MainNavItems";
-----

function App() {
  const menus: MainNavItemTypes[] = [
    {
      label: 'Dashboard',
      icon: <ChartPieIcon width={26} />,
      url: '/'
    }, {
      label: 'Processes',
      icon: <ClipboardDocumentListIcon width={26} />,
      url: '/processes',
    }
  ]

  return (
    <>
      ...Your component code
      <Header 
        logo="https://logo_space.png" 
        logoAlt="Space Academic"
        toggleMenu={onToggleMenu}
        className="header-area"
        usernameAvatar="Sara López" />
      <MainNav menu={menus} />
    </>
  )
}

Example of how the use of the Header and MainNav component might look like

Header Screenshot

Side Navigation

The SideNav component allows the user to generate a side navigation menu.

It is integrated with the Header component, to facilitate its work in mobile versions.

Header Screenshot

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | className | string | Optional. List of classes for component customization | | style | CSSProperties | Optional. Styles for component customization | | menu | SideNavItemTypes[] | Required. List of menu items | | closeButtonLabel | string | Required. Label that will have the menu close button in its mobile version | | toggleMenu | MouseEventHandler | Required. useMenu function enabling menu activation in the mobile version | | stateMenu | string | Required. Status (active/inactive) of the menu. It is recommended to use the status presented by the useMenu hook. |

SideNavItemTypes

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | label | string | Required. Item title | | url | string | Required. Item destination URL | | icon | JSX.Element | Required. JSX element for sample icon |

Usage/Examples

import { Header, SideNav, useMenu } from 'space-react-components'
import { ChartPieIcon, ClipboardDocumentListIcon } from '@heroicons/react/24/outline'
-----
import { SideNavItemTypes } from "space-react-components/dist/components/SideNavItem";
-----

function App() {
  const { activeMenu, onToggleMenu } = useMenu();
  const menus: SideNavItemTypes[] = [
    {
      label: 'Dashboard',
      icon: <ChartPieIcon width={26} />,
      url: '/'
    }, {
      label: 'Processes',
      icon: <ClipboardDocumentListIcon width={26} />,
      url: '/processes',
    }
  ]

  return (
    <>
      ...Your component code
      <Header 
        logo="https://logo_space.png" 
        logoAlt="Space Academic"
        toggleMenu={onToggleMenu}
        className="header-area"
        usernameAvatar="Sara López" />
      <SideNav 
        menu={listado} 
        closeButtonLabel={t('logout')} 
        stateMenu={activeMenu} 
        toggleMenu={onToggleMenu} 
        className="menu-area" />
    </>
  )
}

Hooks

For the development of SRC, hooks have been built to facilitate the integration of the modules with each other.

useMenu()

The useMenu() allows the integration between the Header and SideNav components, this hook allows us to control the status of the menu (active/inactive) in its mobile version.

| Parameter | Type | Description | | :-------- | :------- | :------------------------- | | activeMenu | string | Required. Allows the user to know the current status of the element | | onToggleMenu | string | Required. Function that allows the user to modify the current status of the element |

Usage/Examples

import { Header, SideNav, useMenu } from 'space-react-components'

function App() {
  const { activeMenu, onToggleMenu } = useMenu();

  return (
    <>
      ...Your component code
      <Header 
        toggleMenu={onToggleMenu} />
      <SideNav 
        stateMenu={activeMenu} 
        toggleMenu={onToggleMenu}  />
    </>
  )
}

Authors