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

@enumiton/renum

v0.10.0

Published

A minimalistic react component library without unnecessary dependencies.

Downloads

14

Readme

Renum

npm webpage package license npm bundle size

Description

Another React component library with two unique traits: no unnecessary dependencies and a small package size.

Getting started

Install

yarn add @enumiton/renum

Usage

All components make use of the em/rem units, this means you can easily make any components larger or smaller by changing the font-size of the component or its parent.

import { Button } from '@enumiton/renum';
import '@enumiton/renum/es/styles/renum.less';

function App() {
	return (
		<Button type="primary">
			Hello world
		</Button>
	);
}

Also don't forget to use the RenumProvider component and its localization. You can import different locales from @enumiton/renum/es/locale/ or make your own by using the Locale type and passing it to the locale prop.

import { RenumProvider } from '@enumiton/renum';
import locale from '@enumiton/renum/es/locale/en-us';

function App() {
	return (
		<RenumProvider locale={ locale }>
			{/* … */ }
		</RenumProvider>
	);
}

Styles

All styles can be import from @enumiton/renum/es/styles/renum.css|less, although this isn't recommended for obvious reasons.

A better option is to import the themes from @enumiton/renum/es/styles/themes.less, optionally import a styles normalizer from @enumiton/renum/es/styles/normalize.less and then import all component specific styles dynamically using a library like vite-plugin-style-import.

Types

Since renum is written entirely in TypeScript it has types out-of-the-box.

Though I don't recommend it, you could still use this library with JavaScript. Since props/values are only validated using TypeScript you will run into issues with JavaScript. I will not fix any issues related to wrong props/values being passed through components in JavaScript.

Icons

⚠️ The icon pack will likely be split into its own NPM package due to its install size.

All the icons are from Tabler Icons, a project which provides free and open source icons created by Paweł Kuna.

The icons have already been optimized using svgo so you don't have to.

Usage

Icons are imported from @enumiton/renum/icons. All icons are in seperate files to make tree shaking easy.

import { Button } from '@enumiton/renum';
import { Menu } from '@enumiton/renum/icons';

function App() {
	return (
		<Button
			icon={ <Menu /> }
			type="text"
			shape="circle"
			aria-label="Open menu"
		/>
	);
}

Accessibility

As someone who cares about accessibility, I've made sure that the components of Renum are as accessible as possible. However, this doesn't mean your website will automatically be accessible by just using this library.

When making your website you'll still have to consider accessibility, like giving an input a label. If you're struggling to make something accessible feel free to open an issue in this repository asking for help, if I have time I could give it a look.

Contributing

Todo

Development

Install

$ git clone [email protected]:enumiton/renum.git
$ cd renum
$ yarn
$ yarn icons

Usage

yarn dev

Building

yarn build