wompoDefaultOptions

How to customize the default options of Wompo components to satisfy your exigencies.


Description

Wompo exposes a wompDefaultOptions object that is used to get the default values to use as the second parameter of the defineWompo function.
The options you can modify are:

  • shadow - Default "false".
  • cssModule - Default "true".

To know more about these options see the documentation about the defineWompo function.


Example {#example: default shadow}

One common use case is to make your components use the Shadow DOM by default. To get this result, you should modify the default option before you define any other component. Components rendered before you actually modified the default options will still have the old options applied.

import { wompDefaultOptions } from 'wompo';

wompDefaultOptions.shadow = true;