Installation
mountly is a runtime plus an adapter for your framework of choice. The runtime is required; pick the adapter that matches your component code.
Runtime
Section titled “Runtime”pnpm add mountly# ornpm install mountly# oryarn add mountlyAdapter
Section titled “Adapter”| Framework | Package | Notes |
|---|---|---|
| React | mountly-react | React 18 or 19. |
| Vue | mountly-vue | Vue 3. |
| Svelte | mountly-svelte | Auto-detects v4 (class) vs v5 (functional) component shape. |
pnpm add mountly-react # or mountly-vue, mountly-svelteThe adapter declares the framework as a peer dependency — install it yourself if it isn’t already in the project:
pnpm add react react-dom # for mountly-reactpnpm add vue # for mountly-vuepnpm add svelte # for mountly-svelteOptional: Tailwind preset
Section titled “Optional: Tailwind preset”mountly-tailwind is a Tailwind v4 preset that ships design tokens you can opt into. It is not required.
pnpm add mountly-tailwindSee Tailwind integration.
CDN (no bundler)
Section titled “CDN (no bundler)”For prototyping or static hosts, you can load mountly directly:
<script type="module"> import { createOnDemandFeature } from "https://cdn.jsdelivr.net/npm/mountly@0.1/dist/index.js"; // …</script>For multi-widget pages, set up an import map so several widgets share one runtime — see installRuntime.
Via the CLI
Section titled “Via the CLI”The fastest path is the scaffolder, which lays down the runtime, the React adapter, the build pipeline, and a working host page:
npx mountly init my-widgetSee Quick start for what it produces.
Verify the install
Section titled “Verify the install”import { createOnDemandFeature } from "mountly";import { createWidget } from "mountly-react";
console.log(typeof createOnDemandFeature, typeof createWidget);// "function" "function"If both log "function", you’re set.
- Quick start — scaffold your first widget.
- React adapter —
createWidgetpatterns. - API reference — every exported symbol.