Skip to content
Nuni v1 is here: Figma-style comments on your real site.Get started
Nuni
Esc
↑↓navigate↵open⌘Jpreview

Any JavaScript app

Use init() from @nuniapp/widget in Vue, Nuxt, Svelte, SvelteKit, Astro, Angular or plain bundled JavaScript.

npm install @nuniapp/widget
import { init } from "@nuniapp/widget"

const nuni = init({ project: "nuni_..." })
// later, if you ever need to: nuni.destroy()

Call init once, on the client. Calling it again with the same project does nothing.

import { init } from "@nuniapp/widget"

createApp(App).mount("#app")
init({ project: "nuni_..." })
import { init } from "@nuniapp/widget"

export default defineNuxtPlugin(() => {
  init({ project: "nuni_..." })
})
<script>
  import { onMount } from "svelte"
  import { init } from "@nuniapp/widget"

  onMount(() => init({ project: "nuni_..." }).destroy)
</script>

<slot />
<script>
  import { init } from "@nuniapp/widget"
  init({ project: "nuni_..." })
</script>

Was this page helpful?