0.1.0-beta.3
RU
Getting startedEssentialsTry itReference

Essentials›Material

Material

There are no types of glass, only settings. The defaults are tuned against the system glass on macOS.

Set anything three ways. Attributes win over CSS variables.

<edinstvo-glass frost="0.2" refraction="0.6"></edinstvo-glass>

<style>
  edinstvo-glass { --glass-depth: 18; }
</style>
element.material = { frost: 0.2, tint: "#e54d33" };

Settings

AttributeRangeWhat it does
refraction0 to 1How hard the edge bends what is behind it
depth0 to 96 pxWidth of the curved edge
splay0 to 1Spreads the curve from the edge towards the centre
dispersion0 to 1How far colours split where the glass bends
frost0 to 1Matte surface, a true gaussian up to 20 px
transparency0 to 1How much of the backdrop survives the tint
tintCSS colourGlass colour. auto follows the theme
lift0 to 1Brightens everything behind the glass
light0 to 1Shading across the curve
light-angle-180 to 180°Where the light comes from. 0 is the top
rim0 to 1Thin light line along the edge
glint0 to 1Sharp highlight on the edge
bloom0 to 1Glow inside the glass and around it