Get started with Modulo
Starting snippet (embedded)
<!-- Include CDN & embed Component -->
<script Modulo src="https://unpkg.com/mdu.js">
<Component name="BtnEx">
<Template>
<button><slot></slot></button>
</Template>
<Style>
button { background: tomato }
</Style>
</Component>
</script>
<p><x-BtnEx><em>Hello Modulo</em></x-BtnEx></p>
Brand new?
Take the tutorial!
Modulo is brand new in general, so it's probably brand new to you as well! The Modulo tutorial goes through Modulo basics, starting with HTML and CSS (part 1 and 2), and then JavaScript (part 3).
Start the Tutorial ยปStarting snippet (library)
When keeping your Components in a separate file (e.g.
static/components.html
), include with the following:
<script Modulo
src="https://unpkg.com/mdu.js"
-src="/static/components.html"
></script>
Learn by example?
Explore the demos ยปMore ways to get started
Alternative CDNs
- You can pin a specific version of Modulo as such:
https://unpkg.com/mdu.js@0.0.36/src/Modulo.js
Download
โ Modulo.js (Latest)Or run the following command:
curl https://unpkg.com/mdu.js -o Modulo.js
NPM (Experimental)
If you prefer developing using npm
, or want to try
using Modulo to build an SSG-powered website, then get started with the
tiny create-modulo
scaffolding tool.
-
npm init modulo
or...
-
npx create-modulo