Monster.Components.Host. ToggleButton

The Toggle Button component is used toggle a other element witch has a method called toggle.

Dependencies: the system uses functions of the monsterjs library

You can create this control either by specifying the HTML tagdirectly in the HTML or using Javascript via thedocument.createElement('monster-toggle-button');` method.

<monster-toggle-button></monster-toggle-button>

Or you can create this CustomControl directly in Javascript:

import '@schukai/component-host/source/filter.mjs';
document.createElement('monster-toggle-button');

The Body should have a class "hidden" to ensure that the styles are applied correctly.

body.hidden {
   visibility: hidden;
}

Constructor

new ToggleButton()

A toggle button

Members

defaults

To set the options via the html tag the attribute data-monster-options must be used.

To set the options via the html tag the attribute data-monster-options must be used.

Properties
NameTypeDescription
templatesObject

Template definitions

Properties
NameTypeDescription
mainstring

Main template

See

(static) instanceSymbol

This method is called by the instanceof operator.

This method is called by the instanceof operator.

Methods

(static) getTag() → {string}

Returns:
Type: 
string