UI: Components

Moon Phase

Simple CSS-only web component that adds a dynamic mask to an image of the moon, based on attributes illumination, phase and — optional — mask-color.

Example: Phase cycle
<moon-phase illumination="12" phase="waxing crescent">

Example: Same day, but with different latitudes (Chrome only)
<moon-phase illumination="25" phase="waxing crescent" lat="59.91" hour="22">