Components

MoonWidget

Moon Phase, from magick-components

Today's moon in a tile, with its phase's name: Moon drawn as it looks from the viewer's hemisphere, as from the north unless latitude puts the viewer south of the equator. The phase is worked out in the browser, so the server's HTML draws the unlit disc.

import MoonWidget from "magick-components/astrology/MoonWidget";

magick-components is on npm, under MIT (how to install it), and its source is in the app's repository.

Props

JSX

<MoonWidget background="/night-sky.jpg" />

Props

PropTypeDefaultDescription
backgroundstringThe widget's background image, a URL, drawn to cover; none if omitted.
latitudenumberThe viewer's latitude in degrees, south negative: south of the equator, the moon is drawn turned as it is seen from there.
paddingstring"10px 0 2px 0"Space around the drawing, inside the background, as CSS padding.
Magick.ly is open source. You can see the code used to generate this page in MoonWidget.tsx, MoonWidget.examples.tsx and Explorer.tsx.