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

x-flowchart

v1.0.1

Published

This is a custom tree like flowchart web component (block element). It only has one attribute that aLinkcolor

Downloads

10

Readme

Published on webcomponents.org

FlowChart (Tree):

What is it?

This is a custom tree like flowchart web component (block element). It was made using StencilJS It only has one attribute that a user needs to set (tree). The tree attribute is an array that represent the nodes on the tree.

For example the below array will product the below flowchart

   tree = ['parent', ['child1',['grandchild1'], 'child2', 'child3']]

Alt text

Click here for Demo

How to use it?

It is quite easy to use it on your webpage. Just follow the below steps:

  1. Install it from NPM using the following at the terminal
   npm install x-flowchart --save
  1. Include the link to the script file that holds the this custom web component (reveal-box.js) near the bottom of the body section of your webpage. See below
    <script src='node_modules/x-flowchart/dist/flowchart.js'></script>
  1. Then use the custom element tags on your webpage.
    <x-flowchart tree="['parent', ['child1',['grandchild1'], 'child2', 'child3']]"></x-flowchart>

Note: That is all you have to do to use this custom element. There is an example HTML page (acronym.html) that shows how to use it.

    <!DOCTYPE html>
    <html dir="ltr" lang="en">
        <head>
            <meta charset="utf-8">
            <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
            <title>Stencil Component Starter</title>

            <script src='node_modules/x-flowchart/dist/flowchart.js'></script>

        </head>
        <body>

            <x-flowchart tree='["parent", ["child1",["grandchild1"], "child2", "child3"]]'></x-flowchart>

        </body>
    </html>

There are only one properties that you can use to customize this element.

The only attribute the user needs to set is the tree attribute that holds an array that represent the structure of the tree

To Do:

  1. Add support for more tree types
  2. Add support for setting text and background color

Credit:

The CSS for this web component was inspired by code I found on PenCode by Emil Devantie Brockdorff. That person deserves credit for the css.

Note: It has to be ran from a web server and not just opened locally in a browser or the loading of x-flowchart will be blocked due to CORS policy: (Cross origin requests)