Monster.Components.Host. Details

The Details component is used to show a details.

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-details');` method.

<monster-details></monster-details>

Or you can create this CustomControl directly in Javascript:

import '@schukai/component-state/source/details.mjs';
document.createElement('monster-details');

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

body.hidden {
   visibility: hidden;
}

Constructor

new Details()

A simple details component

Fires:
  • Monster.Components.Host.Details.event:monster-details-before-open
  • Monster.Components.Host.Details.event:monster-details-open
  • Monster.Components.Host.Details.event:monster-details-before-close
  • Monster.Components.Host.Details.event:monster-details-closed

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

classesObject

CSS classes

Properties
NameTypeDescription
buttonstring

CSS class for the button

buttonObject

Button configuration

Properties
NameTypeDescription
labelstring

Button label

featuresObject

Feature configuration

Properties
NameTypeDescription
accordionboolean

Enable accordion mode

persistStateboolean

Persist the state in the host configuration

See

(static) instanceSymbol

This method is called by the instanceof operator.

This method is called by the instanceof operator.

Methods

assembleMethodSymbol() → {Monster.Components.Host.Details}

(static) getCSSStyleSheet() → {Array.<CSSStyleSheet>}

Returns:
Type: 
Array.<CSSStyleSheet>

(static) getTag() → {string}

Returns:
Type: 
string