Adds a semi-transparent overlay on top of the entire page. This is for users who have sensitivity to bright light, high contrast, or blue light.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | object | <optional> | Object of configuration options. Properties
|
Example
const options = {
customColor: 'rgba(250, 170, 140, 0.5)',
customZIndex: 99999
}
LT.init(itemsApp, {
extensions: [
{ id: 'blueLightFilter', args: options }
],
});
Methods
hide() → {void}
Hides the blue light filter if it is currently visible. If the filter is already hidden, it does nothing.
- Since
- 3.0.0
- Returns:
- void
show() → {void}
Shows the blue light filter if it is currently hidden. If the filter is already visible, it does nothing.
- Since
- 3.0.0
- Returns:
- void
toggle() → {boolean}
Shows or hides the blue light filter. Returns true if the blue light filter is currently visible, false otherwise.
- Since
- 3.0.0
- Returns:
- boolean