Skip to content

Browser Global

Ornata ships a browser-ready global build, which means you can use it directly in server-rendered, CMS-driven, or otherwise HTML-first pages without a bundler.

Use a pinned version in production.

<script src="https://cdn.jsdelivr.net/npm/ornata@0.2.0/dist/index.global.js"></script>
<script>
const { defineComponent, createInitializer, isComponent } = window.Ornata;
</script>

The same build is also available on UNPKG:

<script src="https://unpkg.com/ornata@0.2.0/dist/index.global.js"></script>
<script>
const { defineComponent } = window.Ornata;
const Counter = defineComponent({
name: "Counter",
state: {
count: { default: 0 },
},
});
Counter.mount("[data-counter]");
</script>

This is a strong fit for:

  • server-rendered sites
  • prototypes
  • CMS-driven pages
  • pages that want focused interactivity without a separate app build step

If you already have HTML on the page and want to layer interaction onto it, the browser global build keeps the setup extremely small.