Reference›API
API
Everything the package exports.
Tags
| Tag | What it is |
|---|---|
edinstvo-glass | One piece of glass |
edinstvo-glass-group | Shares settings and lets children merge |
Element API
| Member | What it does |
|---|---|
material | Object with any material settings |
source | One of "auto", a selector, an image, video or canvas |
invalidate() | Redraw on the next frame |
show(), hide() | Appear and vanish, both return a promise |
Other attributes
| Attribute | What it does |
|---|---|
source | CSS selector of the backdrop |
live | Redraw every frame |
appear | Materialise on load |
layer | Stacking order |
CSS variables
--glass-radius, --glass-shadow, --glass-tint, --glass-fallback, plus --glass- and the name of any numeric setting.
JavaScript
import {
attachGlass,
defineGlass,
defaults,
ranges,
motionDefaults,
motionRanges,
} from "@edinstvo/glass";defineGlass("my-glass") registers the tags under your own name.