Add the Moon Phase widget to any website with HTML
Real-time moon phase display with illumination percentage, shown as seen from the northern or southern hemisphere. Calculated on the fly, no external service required. One script tag and one element. No build step, no framework, no dependencies.
Sample content — yours appears as soon as you configure it.
How to add Moon Phase to your page
Three steps, a few minutes.
-
1
Create a free account with your site's domain
The widget renders only on the domain you register, so nobody else can use your key.
-
2
Add Moon Phase and copy its code
Pick it in the Widget Gallery, set it up with the live preview, and copy the embed code.
-
3
Paste it where the widget should appear
Put the element where you want the widget and the script tag once per page. Publish and reload.
<!-- 1. Load the myNaturevista loader once per page -->
<script src="https://mynaturevista.com/w.js"></script>
<!-- 2. Place the widget wherever it should appear -->
<div data-menv-widget="moon-phase"
data-menv-key="YOUR_API_KEY"
data-menv-instance="YOUR_INSTANCE_ID"></div>
Moon Phase on your site: what to expect
- The page must be served from the registered domain. Opened as a local file, or from another domain, the widget stays empty.
- In React, Vue or Svelte, render the element as it is and load the script once: the loader watches the page for widgets added later.
- There is also a custom element, for builders that ask for one: <menv-widget widget="…" key="…" instance="…"></menv-widget>.
Moon Phase for HTML: frequently asked questions
Does Moon Phase need jQuery or another library?
No. The loader is plain JavaScript with no dependencies, and the widget runs in its own frame.
Can I restyle it with my own CSS?
The widget is isolated in a frame so that page styles cannot break it. Its look — colours, layout, texts — is set in your dashboard.
Does it work in a single-page app?
Yes. Widgets added to the page after it loads are found automatically, so client-side routing is not a problem.
Can I test it on localhost?
Yes. On a local address the widget shows with a "Test mode" mark and its views are not counted.
Is Moon Phase free?
Yes. Moon Phase is included in every plan, the Free one too: three live widgets and 1,000 views a month, with a small "Powered by myNaturevista" mark. Paid plans remove the mark and raise the limits.
Moon Phase on other platforms
More widgets for HTML
Every widget uses the same loader, so a second one is one more line.
Nature Explorer
Interactive nature and travel widget with countries, places and maps.
Nature Explorer for HTMLWeather
Current conditions and 7-day forecast for any location.
Weather for HTMLSunrise & Sunset
Daily sunrise, sunset and golden hour times for any location.
Sunrise & Sunset for HTMLAir Quality
Real-time AQI and pollution index for any city.
Air Quality for HTMLAdd Moon Phase to your site today
Free plan: three live widgets, 1,000 views a month, no card needed.
