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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@savantly/nexus-ui-components

v0.0.23

Published

This is a component library for React + Tailwind

Downloads

3

Readme

Nexus UI Components

This is a component library for React + Tailwind

Storybook -
https://nexus-ui-components.vercel.app/

It provides a simple way to bootstrap app development by leveraging Tailwind and TW Classed.

Read more about TW-Classed here -
https://github.com/sannajammeh/tw-classed

Read more about Tailwind here -
https://tailwindcss.com/

Quick start

Install the library

npm install --save @savantly/nexus-ui-components

Import the default css variable file in your layout/index (or copy/edit your own) -

import '@savantly/nexus-ui-components/dist/themes/nexus.css';

Import the color mapping in your Tailwind config -

/** @type {import('tailwindcss').Config} */
import { nexusThemeConfig } from "@savantly/nexus-ui-components";

export default {
  content: [
    "./index.html",
    "./src/**/*.{js,ts,jsx,tsx}",
    'node_modules/@savantly/nexus-ui-components/dist/**/*.js',
  ],
  theme: {
    extend: {
      colors: nexusThemeConfig.colors, // Add the color mapping
    },
  },
};

Import a component and use it -

import { Button } from '@savantly/nexus-ui-components';

export const Page = () => {
    return (
        <Button>Test Button</Button>
    )
};

Why?

Why another UI component library? Don't we have a zillion already?

Yes we do =(
But it seems I'm always looking for another one, because of various reasons.

  • license issues
  • flakey integrations
  • complicated customizations
  • lacking features

This library uses CSS vars to add custom colors to extend Tailwind, and the components leverage the built-in and generated classes to give a theming experience similar to Bootstrap.

It's compatible with Next JS app routing, and it's easy to create a custom theme, or extend with existing Tailwind classes.

The TW Classed project provides an excellent developer experience to create custom components with Tailwind.
The properties are typed, and the "variants" system allows us to create self-explanatory components.

React + TypeScript + Vite + Tailwind + Storybook

All the UI components should be small and reusable.
See ./lib/components/ for examples.

The ./src/App.tsx can be used as a demo area for the components, but the React app is NOT published.
This project uses the Vite Library configuration to rollup a UI lib for consumption in other web applications.

Custom Theme

You can create a custom theme by copying the theme file and updating the color values.

./src/themes/nexus.css

Contributing

To develop the components, install the dependencies and run the Storybook for realtime dev iteration.

pnpm install
pnpm run storybook

To add styles, use the Tailwind class names.
If you must use custom styles, use CSS modules in the component's folder.