0.1.0-beta.3
RU
Getting startedEssentialsTry itReference

Reference›API

API

Everything the package exports.

Tags

TagWhat it is
edinstvo-glassOne piece of glass
edinstvo-glass-groupShares settings and lets children merge

Element API

MemberWhat it does
materialObject with any material settings
sourceOne 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

AttributeWhat it does
sourceCSS selector of the backdrop
liveRedraw every frame
appearMaterialise on load
layerStacking 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.