New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@m3e/checkbox

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@m3e/checkbox

Checkbox for M3E

latest
Source
npmnpm
Version
1.3.1
Version published
Maintainers
1
Created
Source

@m3e/checkbox

The m3e-checkbox component enables users to select one or more options from a set. It supports selected, unselected, and indeterminate states, and communicates selection through visual cues and accessible semantics. This component reflects user intent, form participation, and validation feedback, adapting to disabled and required contexts. It emits input and change events to signal state transitions and integrates with form submission via name and value.

This package is part of M3E monorepo, a unified suite of Material 3 web components. Explore the docs to see them in action.

📦 Installation

npm install @m3e/checkbox

💻 Editor Integration

This package includes a Custom Elements Manifest to support enhanced editor tooling and developer experience.

Visual Studio Code

To enable autocomplete and hover documentation for @m3e/checkbox, install the Custom Elements Manifest Language Server extension. It will automatically detect the manifest bundled with this package and surface tag names, attributes, slots, and events in supported files.

Alternately, you can explicitly reference the html-custom-data.json and css-custom-data.json in your workspace settings:

{
  "html.customData": ["./node_modules/@m3e/checkbox/dist/html-custom-data.json"],
  "css.customData": ["./node_modules/@m3e/checkbox/dist/css-custom-data.json"]
}

🚀 Native Module Support

This package uses JavaScript Modules. To use it directly in a browser without a bundler, use a module script similar to the following.

<script type="module" src="/node_modules/@m3e/checkbox/dist/index.js"></script>

In addition, you must use an import map to include dependencies.

<script type="importmap">
  {
    "imports": {
      "lit": "https://cdn.jsdelivr.net/npm/lit@3.3.0/+esm",
      "@m3e/core": "/node_modules/@m3e/core/dist/index.js"
    }
  }
</script>

For production, use index.min.js for faster load times.

🗂️ Elements

  • m3e-checkbox — A checkbox that allows a user to select one or more options from a limited number of choices.

🧪 Examples

The following example illustrates wrapping a m3e-checkbox within a label.

<label>
  <m3e-checkbox></m3e-checkbox>
  Checkbox label
</label>

The next example illustrates use of the for attribute to label a checkbox.

<m3e-checkbox id="chk"></m3e-checkbox><label for="chk">Checkbox label </label>

📖 API Reference

This section details the attributes, events and CSS custom properties available for the m3e-checkbox component.

⚙️ Attributes

AttributeTypeDefaultDescription
checkedbooleanfalseWhether the element is checked.
disabledbooleanfalseWhether the element is disabled.
indeterminatebooleanfalseWhether the element's checked state is indeterminate.
namestringThe name that identifies the element when submitting the associated form.
requiredbooleanfalseWhether the element is required.
valuestring"on"A string representing the value of the checkbox.

🔔 Events

EventDescription
inputEmitted when the checked state changes.
changeEmitted when the checked state changes.

🎛️ CSS Custom Properties

PropertyDescription
--m3e-checkbox-icon-sizeSize of the checkbox icon inside the container.
--m3e-checkbox-container-sizeBase size of the checkbox container.
--m3e-checkbox-container-shapeBorder radius of the icon container.
--m3e-checkbox-unselected-outline-thicknessBorder thickness for unselected state.
--m3e-checkbox-unselected-outline-colorBorder color for unselected state.
--m3e-checkbox-unselected-hover-outline-colorBorder color on hover when unselected.
--m3e-checkbox-unselected-disabled-outline-colorBase color for disabled unselected outline.
--m3e-checkbox-unselected-disabled-outline-opacityOpacity for disabled unselected outline.
--m3e-checkbox-unselected-error-outline-colorBorder color for invalid unselected state.
--m3e-checkbox-selected-container-colorBackground color for selected container.
--m3e-checkbox-selected-icon-colorIcon color for selected state.
--m3e-checkbox-selected-disabled-container-colorBase color for disabled selected container.
--m3e-checkbox-selected-disabled-container-opacityOpacity for disabled selected container.
--m3e-checkbox-selected-disabled-icon-colorBase color for disabled selected icon.
--m3e-checkbox-selected-disabled-icon-opacityOpacity for disabled selected icon.
--m3e-checkbox-unselected-hover-colorRipple hover color for unselected state.
--m3e-checkbox-unselected-focus-colorRipple focus color for unselected state.
--m3e-checkbox-unselected-ripple-colorRipple base color for unselected state.
--m3e-checkbox-selected-hover-colorRipple hover color for selected state.
--m3e-checkbox-selected-focus-colorRipple focus color for selected state.
--m3e-checkbox-selected-ripple-colorRipple base color for selected state.
--m3e-checkbox-unselected-error-hover-colorRipple hover color for invalid unselected state.
--m3e-checkbox-unselected-error-focus-colorRipple focus color for invalid unselected state.
--m3e-checkbox-unselected-error-ripple-colorRipple base color for invalid unselected state.
--m3e-checkbox-selected-error-hover-colorRipple hover color for invalid selected state.
--m3e-checkbox-selected-error-focus-colorRipple focus color for invalid selected state.
--m3e-checkbox-selected-error-ripple-colorRipple base color for invalid selected state.

🤝 Contributing

See the root monorepo CONTRIBUTING.md for guidelines on contributing to this package.

📄 License

This package is licensed under the MIT License.

Keywords

material design

FAQs

Package last updated on 20 Feb 2026

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