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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jelly-checkbox

v0.0.31

Published

An elegant,customizable and jellified checkbox built as web component using Stencil

Readme

Built With Stencil npm version Published on webcomponents.org

jelly-checkbox

An elegant,customizable and jellified checkbox built as web component using Stencil

jelly-checkbox

Try Now

Play with the component Codepen

Install

1. via npm

npm install jelly-checkbox  --save

or

2. via script tag

<script src="https://unpkg.com/jelly-checkbox@latest/dist/jellyCheckbox.js"></script>

Usage

1.Import into module script(required only for npm installations):

import { jelly-checkbox } 

2.Use it in your web page like any other HTML element

<jelly-checkbox></jelly-checkbox>

API

Here are the list of the properties,events, styling attributes and their behavior

Properties

  • checked

    • This property can be used to get/set the checked property of the checkbox.
    • This will automatically sets the attribute of aria-checked attribute thus handling the accessibility
  • disabled

    • This property can be used to get/set the disabled property of the checkbox
    • This will automatically sets the attribute of tabindex attribute to -1
  • label

    • This property can be used to get/set the label text that is associated with the checkbox
    • This will automatically set the aria-labelledby to the value of label
  • indeterminate

    • This property can be used to change the state of the checkbox to indeterminate state.(MDN for more info)
    • When the state of the checkbox is set to indeterminate, then the indeterminate attribute is set to the checkbox

| Property | Value | Example | | --------- |------|---------| | checked | Boolean| js1.checked = true| | disabled| Boolean | js1.disabled = true| | label | String | js1.label = 'Whatever it takes'| | indeterminate| Boolean | js1.indeterminate = false|

CSS Variables

CSS variables are provided to handle the background, border colors used in the component for customization

| CSS variable | Default value | Description | | ------------ |---------------|-------------| | --checked-bgcolor| #673ab7 | Background of the checkbox when the state of the checkbox is checked or indeterminate| |--border-color| #b0b0b0 | Border color of the checkbox| | --tick-color | #ffffff | Color of tick |

Usage

The following snippet describes how we can customize the colors

#js1
{
    --checked-bgcolor: red;
    --border-color:grey;
    --tick-color:yellow;
}

Events

  • change
    • This event is triggered when the checked property of the checkbox is changed between true and false

    • The following snippet describes the usage by using

      • addEventListener
          var jc1 = document.getElementById('jc1');
          jc1.addEventListener('change',handleTheChange);
      
          function handleChange(eventObject)
          {
              console.log(eventObject.detail.value);
              //logs the checked property either true or false
          }

      (or)

      • onchange
      jc1.onchange = function(eventObj)
      {
          console.log(eventObject.detail.value);
              //logs the checked property either true or false
      }

      (or)

      • from HTML
          <jelly-checkbox onchange = "handleChange(event)"></jelly-checkbox>

Accessibility

Accessibilty rules have been followed by handling

  • aria-checked
  • aria-disabled
  • tabindex
  • aria-labelledby

License

MIT License (c) Akhil Sai

forthebadge

Credits

This is inspired from the design of jelly-checkbox by Andreas Storm

Contribution

Wanna contribute?

  • Fork /Clone
  • And run
npm install
npm start

Todos

  • [x] Add Images to Readme
  • [ ] Publish to npm
  • [ ] Publish to web component
  • [ ] Write Unit test case
  • [ ] Write contributing.md file
  • [ ] Form submit support