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

@zooplus/zoo-web-components

v10.4.0

Published

Set of web-components implementing zoo+ style guide

Downloads

44

Readme

Zoo Web Components

| Dependencies | | :-----------------------------------------------------------------------: | | David | | David |

  • Set of extendable, reusable web-components which can be used in any modern UI framework (or without any).
  • 0 dependencies, built with Vanilla JS
  • Doesn't hide native HTML elements behind multiple levels of abstraction but rather enhances them via composition.

Installation

To use this library install it by running:

npm i @zooplus/zoo-web-components --save

When there is a tree-shaking mechanism in your build pipeline, you can import only the components that you need, for example:

import { Input, Select, registerComponents } from '@zooplus/zoo-web-components';
registerComponents(Input, Select);

// or to import everything

import * as zooComponents from  '@zooplus/zoo-web-components';
zooComponents.registerComponents(zooComponents);

All dependencies needed by the components should be pulled automatically, so you don't have to worry about importing classes for zoo-info, zoo-label etc.

Your build tool should remove all of the components that are not imported automatically (when using rollup, for example).

In case you don't use any framework and/or any build tool you can import the whole library with the following:

<script src="path-to-zooplus-lib/zoo-web-components.js"></script>

or only the components that you need, for example:

<script src="path-to-zooplus-lib/checkbox.js"></script>

Note, that IIFE components already include all sub-dependencies needed by the component. For example, the above zoo-checkbox requires also a zoo-info component, it is already in the same bundle as the checkbox. Other components that might also use zoo-info will not throw an error, since care is taken to not redefine same elements in the custom elements registry.

Currently, we recommend to use ESM bundle only when you're using some kind of a bundler, which transforms your code into some js module format that is not ESM, since using pure ESM might trigger FOUC, and we do not want that.

Remember to add CSS custom properties to your main styles file:

:root {
 --primary-mid: #3C9700;
 --primary-light: #66B100;
 --primary-dark: #286400;
 --primary-ultralight: #EBF4E5;
 --secondary-mid: #FF6200;
 --secondary-light: #F80;
 --secondary-dark: #CC4E00;
 --info-ultralight: #ECF5FA;
 --info-mid: #459FD0;
 --warning-ultralight: #FDE8E9;
 --warning-mid: #ED1C24;
}

Examples integrating with various frameworks

Documentation

Landing page is available here: https://zooplus.github.io/zoo-web-components
Documentation page is here: https://zooplus.github.io/zoo-web-components-docs

Note

This library relies on attributes and/or slots. Usage of properties is not supported for simplicity.