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

parvus-ui

v2.0.3

Published

A micro UI kit with all the main UI components in less than 5KB

Downloads

4

Readme

parvus-ui

npm GitHub issues

Welcome to Parvus-UI!

This library is a small footprint shareable UI component library for React and Preact.

The origin of this is seeing how big component libraries had become. They had loads of really great features and they looked great, but they were huge and this made me sad. So I set about to create something with loads of useful features, without going overboard, but in a really small footprint.

Features:

  • Over 15 component types that are often found in every app (buttons, cards, links, breadcrumbs, modals...).
  • Theme provider with contaxt API polyfill for Preact and React 15.
  • styles and className props to customise every component
  • A dev component and styleguide to view and try out every component.
  • Less than 5 KB.

Check out our styleguide: parvusui.github.io View an example project: github.com/parvusui/parvus-ui-example

Installation

$ npm install parvus-ui --save

Usage

Theming

The context api is used for theming and we even have included a polyfill for preact and older versions of react.

To get started on theming just add the provider to your entry or app js file and provide it with the theme like below:

<ThemeProvider
  theme={{
    backgroundColor: '#fefefe',
    neutralColor: '#f9f9f9',
    primaryColor: '#007bff',
    secondaryColor: '#6c757d',
    tertiaryColor: '#fefefe',
    successColor: '#3cb371',
    errorColor: '#ff0000',
    warningColor: '#ffa500',
    borderRadius: 0,
    fontColor: '#000000',
    fontFamily: 'Helvetica Neue, Helvetica, Arial, sans-serif'
  }}
>
  App code here
</ThemeProvider>

Components

All the components follow a similar pattern, just check out the props it requires first and get importing.

  <Button type="primary">Click</Button>

Styling

cxs is used for styling all components and each expose a styles prop which can both overwrite existing styles and also add styles:

<Button
  type="primary"
  styles={{
    backgroundColor: '#222222',
    ':hover': {
      backgroundColor: '#444444',
      opacity: 1
    }
  }}
>
  Click
</Button>

Accessibility

Everything you need for great accessibility support is included out of the box and, in fact, the examples page gets a 100 accessibility score on lighthouse.

Preact

This library works with preact by using preact-compat which you can find here.

Development

Help would be really great as there's so much to do. To get started:

  • Check our issues or get started on your great idea.
  • Fork the repo.
  • Follow the commands below.
  • When finished submit your pull request and let us have a look.

Guidelines

  • All components should be stateless functional components, although if there's a case otherwise please submit the pr anyway.
  • All components should have tests.
  • All components should be added to the examples view and styleguide.
  • Use rem in every component.

Commands

Install dependencies:

$ npm install

Run the example app at http://localhost:3000:

$ npm start

View the styleguide at http://localhost:6060:

$ npm run styleguide

Run tests and watch for code changes using jest:

$ npm test

Lint src and test files:

$ npm run lint

Questions

Docs never cover everything so if you've any questions feel free to reach out to @sringland on twitter or put it in a github issue.

License

MIT