CodeCoupler Costa Components Box
The Box component is the simplest of all and forms the basis for many others. It simply generates
an HTML element and registers it as a box component.
By default, this element is a div, but this can be changed using the tag option. The component
also allows you to set the HTML element's attributes as required.
The style and class attributes can be set separately and respond to changes. Classes and styles
can be modified or added, resulting in immediate updates.
To extend from Box use the finalize method to extend the inner structure of the box element:
Options
tag: Stringattributes: Object-
Specify the tag and the attributes of the box element.
style: String | Object | Function | Array<String|Object|Function> | nullclass: String | Function | Array<String|Function> | null-
Set classes and styles . These options use the functions from the
@codecoupler/dom-set-classand@codecoupler/dom-set-stylepackages to set the styles and classes.