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

@cianciarusocataldo/demo-ui

v3.1.0

Published

A tiny UI library designed for build interactive demos for every react app

Downloads

41

Readme

demo-ui

GitHub npm GitHub release (latest by date) npm type definitions GitHub repo size npm bundle size Lines of code bit Maintenance

A tiny UI library designed for build interactive demos for every react app.

Summary

Why Demo-ui?

demo-ui provide a flexible and responsive playground to test any component. It can be used to have a real-time preview while playing with the component's properties, without touching the code.

Use demo-ui with react-styleguidist

When developing React apps, expecially in teams, a common (and safer) approach is to test every component separately, into an isolated environment, before introducing it into the app, to prevent unexpected behaviours and undesired errors. This job is usually done by various utilities, like react-styleguidist. When using a Styleguide, for example, for every component is usually provided a demo (or example) file (or multiple files). demo-ui can be used to stadardize the demos's design and to have them all wrapped into a dedicated and isolated playground, fully customizable. This brings some advantages:

  • Less code, less time wasted: wrapping a component with demo-ui is really quick and intuitive to do when writing demo files (for Styleguidist, .md), and gives to other devs the ability to experiment with the component, without the need to write additional static examples (or implements selectors, input fields and so on). demo-ui can do the job for you. As a side-effect, this can speed up the Styleguide rendering process (less DOM nodes).

  • Standard UI for every demo: when working in team on a single project, every dev usually write demo files in a preferred way (implementing selectors, importing external components to give a realistic scenario, and so on). This usually make the global Styleguide's UI not homogeneous.

Installation

The whole demo-ui library can be installed from official npm registry:

npm i @cianciarusocataldo/demo-ui

Installation's steps can be different, depends on which package manager is used.

It's possible to download every demo-ui component separately, with Bit package registry. Before next step, add the following entry to your .npmrc file, that must be located to the host project root (look at the official Bit docs for details):

@bit:registry= https://node.bit.dev

Now Bit registry is accessible from npm:

  • Box npm i @bit/cianciarusocataldo.demo-ui.box

  • Previewer npm i @bit/cianciarusocataldo.demo-ui.previewer

  • Demo npm i @bit/cianciarusocataldo.demo-ui.demo

  • Prop creators npm i @bit/cianciarusocataldo.demo-ui.prop-creators

  • Logic npm i @bit/cianciarusocataldo.demo-ui.logic

  • Types npm i @bit/cianciarusocataldo.demo-ui.types

demo-ui component collection can be found on https://bit.dev/cianciarusocataldo/demo-ui

See in action

Wanna see how this library works in real time? A static version of the integrated playground can be found on https://cianciarusocataldo.github.io/demo-ui

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details