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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@conectate/ct-checkbox

v4.5.6

Published

HTML checkbox web component based on Material design

Readme

Published on webcomponents.org

ct-checkbox

A customizable checkbox web component built with LitElement.

Installation

# npm
npm i @conectate/ct-checkbox

# yarn
yarn add @conectate/ct-checkbox

# pnpm
pnpm i @conectate/ct-checkbox

Usage

Basic Usage

import '@conectate/ct-checkbox';

// Then use in your HTML
<ct-checkbox>Check me</ct-checkbox>

Examples

<!-- Basic checkbox -->
<ct-checkbox>Basic checkbox</ct-checkbox>

<!-- Pre-checked checkbox -->
<ct-checkbox checked>Pre-checked</ct-checkbox>

<!-- With label property -->
<ct-checkbox label="Using label property"></ct-checkbox>

<!-- Indeterminate state -->
<ct-checkbox indeterminate>Indeterminate</ct-checkbox>

<!-- Disabled checkbox -->
<ct-checkbox disabled>Disabled</ct-checkbox>

<!-- With value and name -->
<ct-checkbox name="accept" value="terms">Accept terms</ct-checkbox>

Event Handling

// Listen for state changes
const checkbox = document.querySelector('ct-checkbox');
checkbox.addEventListener('checked', (e) => {
  console.log('Checkbox checked:', e.detail.checked);
});

// Standard change event is also dispatched
checkbox.addEventListener('change', (e) => {
  console.log('Change event fired');
});

Theming

The ct-checkbox component can be customized using CSS custom properties:

ct-checkbox {
	/* Size and shape */
	--ct-checkbox-box-size: 24px;
	--ct-checkbox-box-border-radius: 8px;
	--ct-checkbox-height: var(--ct-checkbox-box-size);
	--ct-checkbox-box-border-size: 3px;

	/* Colors */
	--color-primary: #2cb5e8;
	--color-on-primary: #fff;
	--color-on-background: #535353;
}

API

Properties

| Property | Attribute | Type | Default | Description | | --------------- | --------------- | --------- | ------- | ---------------------------------- | | checked | checked | boolean | false | Checkbox checked state | | indeterminate | indeterminate | boolean | false | Checkbox indeterminate state | | disabled | disabled | boolean | false | Disables the checkbox | | value | value | any | - | Value associated with the checkbox | | name | name | string | "" | Name attribute for form submission | | label | label | string | "" | Text label (alternative to slot) |

Methods

| Name | Description | | --------- | ------------------------------------ | | click() | Programmatically clicks the checkbox |

Events

| Event Name | Detail | Description | | ---------- | --------------------------- | -------------------------------- | | checked | {checked: boolean} | Fires when checked state changes | | change | Native event (redispatched) | Standard input change event |

Slots

| Name | Description | | ----------- | ------------------------------------- | | (default) | Content is used as the checkbox label |

Styling

Shadow Parts

The component uses internal styling but can be customized with CSS custom properties.

CSS Custom Properties

| Property | Description | | --------------------------------- | ------------------------------------------- | | --ct-checkbox-box-size | Size of the checkbox (default: 24px) | | --ct-checkbox-box-border-radius | Border radius of checkbox (default: 8px) | | --ct-checkbox-height | Height of the checkbox component | | --ct-checkbox-box-border-size | Border size of unchecked box (default: 3px) | | --color-primary | Color used for the checked state | | --color-on-primary | Color of the checkmark | | --color-on-background | Color of the unchecked checkbox border |

Follow me

Herberth Obregón

https://x.com/herberthobregon

https://dev.to/herberthobregon

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -m 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

  • v1.0.1 Initial Release

License

See LICENSE