@material/icon-button

  • Version 14.0.0
  • Published
  • 428 kB
  • 11 dependencies
  • MIT license

Install

npm i @material/icon-button
yarn add @material/icon-button
pnpm add @material/icon-button

Overview

The Material Components for the web icon button component

Index

Variables

variable cssClasses

const cssClasses: { ICON_BUTTON_ON: string; ROOT: string };
  • Copyright 2018 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 strings

const strings: {
ARIA_LABEL: string;
ARIA_PRESSED: string;
DATA_ARIA_LABEL_OFF: string;
DATA_ARIA_LABEL_ON: string;
CHANGE_EVENT: string;
};

    Classes

    class MDCIconButtonToggle

    class MDCIconButtonToggle extends MDCComponent<MDCIconButtonToggleFoundation> {}

      property on

      on: boolean;

        property ripple

        readonly ripple: MDCRipple;

          method attachTo

          static attachTo: (root: HTMLElement) => MDCIconButtonToggle;

            method destroy

            destroy: () => void;

              method getDefaultFoundation

              getDefaultFoundation: () => MDCIconButtonToggleFoundation;

                method initialSyncWithDOM

                initialSyncWithDOM: () => void;

                  class MDCIconButtonToggleFoundation

                  class MDCIconButtonToggleFoundation extends MDCFoundation<MDCIconButtonToggleAdapter> {}

                    constructor

                    constructor(adapter?: Partial<MDCIconButtonToggleAdapter>);

                      property cssClasses

                      static readonly cssClasses: { ICON_BUTTON_ON: string; ROOT: string };

                        property defaultAdapter

                        static readonly defaultAdapter: MDCIconButtonToggleAdapter;

                          property strings

                          static readonly strings: {
                          ARIA_LABEL: string;
                          ARIA_PRESSED: string;
                          DATA_ARIA_LABEL_OFF: string;
                          DATA_ARIA_LABEL_ON: string;
                          CHANGE_EVENT: string;
                          };

                            method handleClick

                            handleClick: () => void;

                              method init

                              init: () => void;

                                method isOn

                                isOn: () => boolean;

                                  method toggle

                                  toggle: (isOn?: boolean) => void;

                                    Interfaces

                                    interface MDCIconButtonToggleAdapter

                                    interface MDCIconButtonToggleAdapter {}
                                    • 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 getAttr

                                      getAttr: (attrName: string) => string | null;
                                      • Returns the given attribute value on the root element.

                                      method hasClass

                                      hasClass: (className: string) => boolean;

                                        method notifyChange

                                        notifyChange: (evtData: MDCIconButtonToggleEventDetail) => void;

                                          method removeClass

                                          removeClass: (className: string) => void;

                                            method setAttr

                                            setAttr: (attrName: string, attrValue: string) => void;

                                              interface MDCIconButtonToggleEventDetail

                                              interface MDCIconButtonToggleEventDetail {}
                                              • Copyright 2019 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.

                                              property isOn

                                              isOn: boolean;

                                                Package Files (6)

                                                Dependencies (11)

                                                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/icon-button.

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