@material/checkbox

  • Version 12.0.0
  • Published
  • 747 kB
  • 9 dependencies
  • MIT license

Install

npm i @material/checkbox
yarn add @material/checkbox
pnpm add @material/checkbox

Overview

The Material Components for the web checkbox component

Index

Namespaces

namespace @material/checkbox

module '@material/checkbox' {}

    variable cssClasses

    const cssClasses: {
    ANIM_CHECKED_INDETERMINATE: string;
    ANIM_CHECKED_UNCHECKED: string;
    ANIM_INDETERMINATE_CHECKED: string;
    ANIM_INDETERMINATE_UNCHECKED: string;
    ANIM_UNCHECKED_CHECKED: string;
    ANIM_UNCHECKED_INDETERMINATE: string;
    BACKGROUND: string;
    CHECKED: string;
    CHECKMARK: string;
    CHECKMARK_PATH: string;
    DISABLED: string;
    INDETERMINATE: string;
    MIXEDMARK: string;
    NATIVE_CONTROL: string;
    ROOT: string;
    SELECTED: string;
    UPGRADED: string;
    };
    • Copyright 2016 Google Inc.

      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

      The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    variable numbers

    const numbers: { ANIM_END_LATCH_MS: number };

      variable strings

      const strings: {
      ARIA_CHECKED_ATTR: string;
      ARIA_CHECKED_INDETERMINATE_VALUE: string;
      DATA_INDETERMINATE_ATTR: string;
      NATIVE_CONTROL_SELECTOR: string;
      TRANSITION_STATE_CHECKED: string;
      TRANSITION_STATE_INDETERMINATE: string;
      TRANSITION_STATE_INIT: string;
      TRANSITION_STATE_UNCHECKED: string;
      };

        class MDCCheckbox

        class MDCCheckbox
        extends MDCComponent<MDCCheckboxFoundation>
        implements MDCRippleCapableSurface {}

          property checked

          checked: boolean;

            property disabled

            disabled: boolean;

              property indeterminate

              indeterminate: boolean;

                property ripple

                readonly ripple: any;

                  property value

                  value: string;

                    method attachTo

                    static attachTo: (root: Element) => MDCCheckbox;

                      method destroy

                      destroy: () => void;

                        method getDefaultFoundation

                        getDefaultFoundation: () => MDCCheckboxFoundation;

                          method initialize

                          initialize: () => void;

                            method initialSyncWithDOM

                            initialSyncWithDOM: () => void;

                              class MDCCheckboxFoundation

                              class MDCCheckboxFoundation extends MDCFoundation<MDCCheckboxAdapter> {}

                                constructor

                                constructor(adapter?: Partial<MDCCheckboxAdapter>);

                                  property cssClasses

                                  static readonly cssClasses: {
                                  ANIM_CHECKED_INDETERMINATE: string;
                                  ANIM_CHECKED_UNCHECKED: string;
                                  ANIM_INDETERMINATE_CHECKED: string;
                                  ANIM_INDETERMINATE_UNCHECKED: string;
                                  ANIM_UNCHECKED_CHECKED: string;
                                  ANIM_UNCHECKED_INDETERMINATE: string;
                                  BACKGROUND: string;
                                  CHECKED: string;
                                  CHECKMARK: string;
                                  CHECKMARK_PATH: string;
                                  DISABLED: string;
                                  INDETERMINATE: string;
                                  MIXEDMARK: string;
                                  NATIVE_CONTROL: string;
                                  ROOT: string;
                                  SELECTED: string;
                                  UPGRADED: string;
                                  };

                                    property defaultAdapter

                                    static readonly defaultAdapter: MDCCheckboxAdapter;

                                      property numbers

                                      static readonly numbers: { ANIM_END_LATCH_MS: number };

                                        property strings

                                        static readonly strings: {
                                        ARIA_CHECKED_ATTR: string;
                                        ARIA_CHECKED_INDETERMINATE_VALUE: string;
                                        DATA_INDETERMINATE_ATTR: string;
                                        NATIVE_CONTROL_SELECTOR: string;
                                        TRANSITION_STATE_CHECKED: string;
                                        TRANSITION_STATE_INDETERMINATE: string;
                                        TRANSITION_STATE_INIT: string;
                                        TRANSITION_STATE_UNCHECKED: string;
                                        };

                                          method destroy

                                          destroy: () => void;

                                            method handleAnimationEnd

                                            handleAnimationEnd: () => void;
                                            • Handles the animationend event for the checkbox

                                            method handleChange

                                            handleChange: () => void;
                                            • Handles the change event for the checkbox

                                            method init

                                            init: () => void;

                                              method setDisabled

                                              setDisabled: (disabled: boolean) => void;

                                                interface MDCCheckboxAdapter

                                                interface MDCCheckboxAdapter {}
                                                • Defines the shape of the adapter expected by the foundation. Implement this adapter for your framework of choice to delegate updates to the component in your framework of choice. See architecture documentation for more details. https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md

                                                method addClass

                                                addClass: (className: string) => void;

                                                  method forceLayout

                                                  forceLayout: () => void;

                                                    method hasNativeControl

                                                    hasNativeControl: () => boolean;

                                                      method isAttachedToDOM

                                                      isAttachedToDOM: () => boolean;

                                                        method isChecked

                                                        isChecked: () => boolean;

                                                          method isIndeterminate

                                                          isIndeterminate: () => boolean;

                                                            method removeClass

                                                            removeClass: (className: string) => void;

                                                              method removeNativeControlAttr

                                                              removeNativeControlAttr: (attr: string) => void;

                                                                method setNativeControlAttr

                                                                setNativeControlAttr: (attr: string, value: string) => void;

                                                                  method setNativeControlDisabled

                                                                  setNativeControlDisabled: (disabled: boolean) => void;

                                                                    type MDCCheckboxFactory

                                                                    type MDCCheckboxFactory = (
                                                                    el: Element,
                                                                    foundation?: MDCCheckboxFoundation
                                                                    ) => MDCCheckbox;

                                                                      namespace @material/checkbox/adapter

                                                                      module '@material/checkbox/adapter' {}

                                                                        interface MDCCheckboxAdapter

                                                                        interface MDCCheckboxAdapter {}
                                                                        • Defines the shape of the adapter expected by the foundation. Implement this adapter for your framework of choice to delegate updates to the component in your framework of choice. See architecture documentation for more details. https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md

                                                                        method addClass

                                                                        addClass: (className: string) => void;

                                                                          method forceLayout

                                                                          forceLayout: () => void;

                                                                            method hasNativeControl

                                                                            hasNativeControl: () => boolean;

                                                                              method isAttachedToDOM

                                                                              isAttachedToDOM: () => boolean;

                                                                                method isChecked

                                                                                isChecked: () => boolean;

                                                                                  method isIndeterminate

                                                                                  isIndeterminate: () => boolean;

                                                                                    method removeClass

                                                                                    removeClass: (className: string) => void;

                                                                                      method removeNativeControlAttr

                                                                                      removeNativeControlAttr: (attr: string) => void;

                                                                                        method setNativeControlAttr

                                                                                        setNativeControlAttr: (attr: string, value: string) => void;

                                                                                          method setNativeControlDisabled

                                                                                          setNativeControlDisabled: (disabled: boolean) => void;

                                                                                            namespace @material/checkbox/component

                                                                                            module '@material/checkbox/component' {}

                                                                                              class MDCCheckbox

                                                                                              class MDCCheckbox
                                                                                              extends MDCComponent<MDCCheckboxFoundation>
                                                                                              implements MDCRippleCapableSurface {}

                                                                                                property checked

                                                                                                checked: boolean;

                                                                                                  property disabled

                                                                                                  disabled: boolean;

                                                                                                    property indeterminate

                                                                                                    indeterminate: boolean;

                                                                                                      property ripple

                                                                                                      readonly ripple: any;

                                                                                                        property value

                                                                                                        value: string;

                                                                                                          method attachTo

                                                                                                          static attachTo: (root: Element) => MDCCheckbox;

                                                                                                            method destroy

                                                                                                            destroy: () => void;

                                                                                                              method getDefaultFoundation

                                                                                                              getDefaultFoundation: () => MDCCheckboxFoundation;

                                                                                                                method initialize

                                                                                                                initialize: () => void;

                                                                                                                  method initialSyncWithDOM

                                                                                                                  initialSyncWithDOM: () => void;

                                                                                                                    type MDCCheckboxFactory

                                                                                                                    type MDCCheckboxFactory = (
                                                                                                                    el: Element,
                                                                                                                    foundation?: MDCCheckboxFoundation
                                                                                                                    ) => MDCCheckbox;

                                                                                                                      namespace @material/checkbox/constants

                                                                                                                      module '@material/checkbox/constants' {}

                                                                                                                        variable cssClasses

                                                                                                                        const cssClasses: {
                                                                                                                        ANIM_CHECKED_INDETERMINATE: string;
                                                                                                                        ANIM_CHECKED_UNCHECKED: string;
                                                                                                                        ANIM_INDETERMINATE_CHECKED: string;
                                                                                                                        ANIM_INDETERMINATE_UNCHECKED: string;
                                                                                                                        ANIM_UNCHECKED_CHECKED: string;
                                                                                                                        ANIM_UNCHECKED_INDETERMINATE: string;
                                                                                                                        BACKGROUND: string;
                                                                                                                        CHECKED: string;
                                                                                                                        CHECKMARK: string;
                                                                                                                        CHECKMARK_PATH: string;
                                                                                                                        DISABLED: string;
                                                                                                                        INDETERMINATE: string;
                                                                                                                        MIXEDMARK: string;
                                                                                                                        NATIVE_CONTROL: string;
                                                                                                                        ROOT: string;
                                                                                                                        SELECTED: string;
                                                                                                                        UPGRADED: string;
                                                                                                                        };
                                                                                                                        • Copyright 2016 Google Inc.

                                                                                                                          Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

                                                                                                                          The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

                                                                                                                          THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

                                                                                                                        variable numbers

                                                                                                                        const numbers: { ANIM_END_LATCH_MS: number };

                                                                                                                          variable strings

                                                                                                                          const strings: {
                                                                                                                          ARIA_CHECKED_ATTR: string;
                                                                                                                          ARIA_CHECKED_INDETERMINATE_VALUE: string;
                                                                                                                          DATA_INDETERMINATE_ATTR: string;
                                                                                                                          NATIVE_CONTROL_SELECTOR: string;
                                                                                                                          TRANSITION_STATE_CHECKED: string;
                                                                                                                          TRANSITION_STATE_INDETERMINATE: string;
                                                                                                                          TRANSITION_STATE_INIT: string;
                                                                                                                          TRANSITION_STATE_UNCHECKED: string;
                                                                                                                          };

                                                                                                                            namespace @material/checkbox/foundation

                                                                                                                            module '@material/checkbox/foundation' {}

                                                                                                                              class MDCCheckboxFoundation

                                                                                                                              class MDCCheckboxFoundation extends MDCFoundation<MDCCheckboxAdapter> {}

                                                                                                                                constructor

                                                                                                                                constructor(adapter?: Partial<MDCCheckboxAdapter>);

                                                                                                                                  property cssClasses

                                                                                                                                  static readonly cssClasses: {
                                                                                                                                  ANIM_CHECKED_INDETERMINATE: string;
                                                                                                                                  ANIM_CHECKED_UNCHECKED: string;
                                                                                                                                  ANIM_INDETERMINATE_CHECKED: string;
                                                                                                                                  ANIM_INDETERMINATE_UNCHECKED: string;
                                                                                                                                  ANIM_UNCHECKED_CHECKED: string;
                                                                                                                                  ANIM_UNCHECKED_INDETERMINATE: string;
                                                                                                                                  BACKGROUND: string;
                                                                                                                                  CHECKED: string;
                                                                                                                                  CHECKMARK: string;
                                                                                                                                  CHECKMARK_PATH: string;
                                                                                                                                  DISABLED: string;
                                                                                                                                  INDETERMINATE: string;
                                                                                                                                  MIXEDMARK: string;
                                                                                                                                  NATIVE_CONTROL: string;
                                                                                                                                  ROOT: string;
                                                                                                                                  SELECTED: string;
                                                                                                                                  UPGRADED: string;
                                                                                                                                  };

                                                                                                                                    property defaultAdapter

                                                                                                                                    static readonly defaultAdapter: MDCCheckboxAdapter;

                                                                                                                                      property numbers

                                                                                                                                      static readonly numbers: { ANIM_END_LATCH_MS: number };

                                                                                                                                        property strings

                                                                                                                                        static readonly strings: {
                                                                                                                                        ARIA_CHECKED_ATTR: string;
                                                                                                                                        ARIA_CHECKED_INDETERMINATE_VALUE: string;
                                                                                                                                        DATA_INDETERMINATE_ATTR: string;
                                                                                                                                        NATIVE_CONTROL_SELECTOR: string;
                                                                                                                                        TRANSITION_STATE_CHECKED: string;
                                                                                                                                        TRANSITION_STATE_INDETERMINATE: string;
                                                                                                                                        TRANSITION_STATE_INIT: string;
                                                                                                                                        TRANSITION_STATE_UNCHECKED: string;
                                                                                                                                        };

                                                                                                                                          method destroy

                                                                                                                                          destroy: () => void;

                                                                                                                                            method handleAnimationEnd

                                                                                                                                            handleAnimationEnd: () => void;
                                                                                                                                            • Handles the animationend event for the checkbox

                                                                                                                                            method handleChange

                                                                                                                                            handleChange: () => void;
                                                                                                                                            • Handles the change event for the checkbox

                                                                                                                                            method init

                                                                                                                                            init: () => void;

                                                                                                                                              method setDisabled

                                                                                                                                              setDisabled: (disabled: boolean) => void;

                                                                                                                                                Package Files (1)

                                                                                                                                                Dependencies (9)

                                                                                                                                                Dev Dependencies (0)

                                                                                                                                                No dev dependencies.

                                                                                                                                                Peer Dependencies (0)

                                                                                                                                                No peer dependencies.

                                                                                                                                                Badge

                                                                                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@material/checkbox.

                                                                                                                                                • Markdown
                                                                                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@material/checkbox)
                                                                                                                                                • HTML
                                                                                                                                                  <a href="https://www.jsdocs.io/package/@material/checkbox"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>