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

@pezeshk-book/ui-kit

v0.3.61

Published

UIkit components for use in React or Next.js.

Downloads

105

Readme

React components for faster and simpler web development. Build your own design system, or start with Pezeshkbook Design system.

This project was built by React and tailwind for using in React or Next.js projects.

Installation

using npm:

npm install --save @pezeshk-book/ui-kit

React Js Config

Add the Tailwind directives to your CSS global

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

Next Js Config

Add the Tailwind directives to your global.css

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

tailwind.config will be generated automatically

for more configs you can visit - tailwind Documentation

Add Your Own Fonts

in your tailwind.config.js file there are 4 types of font (light, regular, medium and bold) which will be use in Text component.
the type props in Text component will handle these 4 fonts.

Change Package Font in React.js & Next.js

First you need to create a folder named fonts in your public directory, then paste your fonts there. After that, add these lines of code in your CSS global.

@font-face {
  font-family: 'mediumFont';
  src: url('{relative path to your added font}') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'regularFont';
  src: url('{relative path to your added font}') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'boldFont';
  src: url('{relative path to your added font}') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'lightFont';
  src: url('{relative path to your added font}') format('truetype');
  font-display: swap;
}

Add @pezeshk-book/ui-kit config to tailwind.config.js

const withUiKit = require('@pezeshk-book/ui-kit/withUiKit');

module.exports = withUiKit({
    content: [
        //...
    ],
    theme: {
        // Add your fonts which you already added to global styles
        fontFamily: {
            'family-regular': 'regularFont',
            'family-medium': 'mediumFont',
            'family-bold': 'boldFont',
            'family-light': 'lightFont',
        },
        extend: {
            // Add new colors or custom system colors
            colors: {
                'blue': {
                    50: '#F5F7FF',
                    100: '#EAEEFF',
                    200: '#D5DEFF',
                    300: '#C1CDFF',
                    400: '#ACBDFF',
                    500: '#97ACFF',
                    600: '#798ACC',
                    700: '#5B6799',
                    800: '#3C4566',
                    900: '#1E2233',
                    950: '#0F111A',
                },
            },
            // You can add other configurations here
            lineHeight: {
                //...
            },
        },
    },
});

Usage

Here is a quick example to get you started, it's all you need:

import React from 'react';
import ReactDOM from 'react-dom';
import { Button, Div, Text } from '@pezeshk-book/ui-kit';

function App() {
  return (
      <Div>
          <Text>This is a very simple example:</Text>
          <Button variant="filled">Hello World</Button>
      </Div>
  );
}

ReactDOM.render(<App />, document.querySelector('#app'));

Examples

You can check the storybook in the pbkit.pezeshkbook.com.

and you are ready to go, just like that (^_^)