Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dile-checkbox

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dile-checkbox

Webcomponent dile-checkbox following open-wc recommendations

  • 2.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

Moved

This package has moved and is now available at @dile/dile-checkbox. Please update your dependencies. This repository is no longer maintained.

<dile-checkbox>

Web Component to create a customized checkbox input interface, based on LitElement.

Let's go to DEMOS page!

Installation

npm i dile-checkbox

Usage

<script type="module">
  import 'dile-checkbox/dile-checkbox.js';
</script>

<dile-checkbox>Label for the element</dile-checkbox>

Properties

  • checked: Boolean, defines the checkbox state.
  • disabled: Boolean, mark checkbox as disabled.

Custom events

  • dile-checkbox-changed: Every time the checkbox changes emits a dile-checkbox-changed event. The checkbox current state is received in the handler usign the event object "detail" property.

CSS Custom Properties

You can customize it using CSS Custom Properties.

Custom propertyDescriptionDefault
--dile-checkbox-checked-colorChecked color for check control#30a030
--dile-checkbox-unchecked-colorUnchecked color for check control#ccc
--dile-checkbox-fill-colorFill color for the check control#fff
--dile-checkbox-unchecked-fill-colorChecked color for check control when is in unchecked status#fff
--dile-checkbox-label-colorlabel regular color#303030
--dile-checkbox-label-disabled-colorLabel color for disabled status#303030
--dile-checkbox-font-weightFont weight for te labelnormal
--dile-checkbox-sizeCheckbox size20px
<style>
.customized {
  --dile-checkbox-checked-color: #006;
  --dile-checkbox-unchecked-color: #f66;
  --dile-checkbox-fill-color: #fcc;
  --dile-checkbox-unchecked-fill-color: #666;
  --dile-checkbox-label-color: #c57;
  --dile-checkbox-font-weight: bold;
  --dile-checkbox-label-disabled-color: #ddd;
}
</style>

<dile-checkbox checked class="customized">Mark as urgent</dile-checkbox>

Keywords

FAQs

Package last updated on 07 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc