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

stark-lib

v0.1.3

Published

Stark UI is a reusable and extendable UI component library built using React and Tailwind CSS. It aims to provide a consistent, accessible, and customizable set of components to help developers create modern and responsive applications.

Downloads

9

Readme

Stark UI

Stark UI is a reusable and extendable UI component library built using React and Tailwind CSS. It aims to provide a consistent, accessible, and customizable set of components to help developers create modern and responsive applications.

Table of Contents

Getting Started

To start using the Stark UI in your project, follow these steps:

  1. Install the package via npm or yarn.
  2. Import the necessary components from the library.
  3. Customize the UI using the provided Tailwind CSS configuration.

Installation

Install the Stark UI package using npm or yarn:

npm install stark-lib

or

yarn add stark-lib

Usage

Install Tailwind CSS in your consuming app

npm install tailwindcss

Then import necessarry tailwind classess in your index.css file. Don't forget to include the tokens that come with the library.

@tailwind base;
@tailwind components;
@tailwind utilities;
@import "stark-lib/dist/tokens.css";

Initialize Tailwind CSS in your consuming app

npx tailwindcss init

Edit your tailwind.config.js file to include Stark UI's Tailwind CSS configuration. You can do this by importing Stark from stark-lib and using it as a plugin in your Tailwind config file.

import { Stark, libraryPath } from "stark-lib";
module.exports = {
  content: ["./src/*.{js,ts,jsx,tsx}", libraryPath],
  plugins: [Stark],
};

It's imperative to include libraryPath to your config content. This ensures that your customizations are correctly applied to the components imported from Stark UI.

Import and use the components from the Stark UI in your React application:

import React from "react";
import { Button } from "stark-lib";

const App = () => {
  return (
    <div>
      <Button intent="primary" label="Click me" />
    </div>
  );
};

export default App;

Customization

Stark UI comes with a default Tailwind CSS configuration, which can be easily customized to match your application's branding and design requirements.

To do this, you can either override or extend the theme in your config. I'll prepare an API documentation for this.

import { Stark, libraryPath } from "stark-lib";
module.exports = {
  content: ["./src/*.{js,ts,jsx,tsx}", libraryPath],
  theme: {
    extend: {
      backgroundColor: {
        brand: "#FF0000",
      },
      // Add more custom theme configuration here
    },
  },
  plugins: [Stark],
};

You can also override the base color tokens in your main CSS file

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --brand-50: 0deg 0% 100%;
  --brand-100: 252.86deg 19.44% 85.88%;
  --brand-200: 252deg 19.38% 74.71%;
  --brand-300: 251.67deg 19.35% 63.53%;
  --brand-400: 252.5deg 20% 52.94%;
  --brand-500: 253.45deg 26.61% 42.75%;
  --brand-600: 252.54deg 40.12% 32.75%;
  --brand-700: 252.86deg 44.87% 30.59%;
  --brand-800: 252.5deg 49.32% 28.63%;
  --brand-900: 252.33deg 54.07% 26.47%;
  --brand-1000: 252.8deg 60% 24.51%;
  --brand-1100: 252.31deg 68.42% 22.35%;
}

Contributing

We welcome contributions to improve the Stark UI. To contribute:

  1. Fork the repository.
  2. Create a new branch with your changes.
  3. Submit a pull request with a detailed description of your changes.

Please ensure your changes follow the code style and conventions of the project.

License

Stark UI is licensed under the MIT License.