npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nuxtjs-tauri

v1.0.0

Published

Nuxt module for Tauri v2. Auto-configures SSR, auto-imports composables (useTauri, useTauriWindow, useTauriNotification) and provides $isTauri — zero boilerplate desktop-app integration.

Readme

nuxtjs-tauri

npm version npm downloads License: MIT

Nuxt module for Tauri v2 — the missing glue layer between Nuxt and native desktop.

Add nuxtjs-tauri to your project and get:

  • ssr: false auto-configured (Tauri is always client-side)
  • useTauri() — type-safe invoke() + reactive isTauri
  • useTauriWindow() — minimize, maximize, fullscreen, close with one line
  • useTauriNotification() — native notifications with auto permission handling
  • $isTauri — inject available in every component
  • ✅ All composables are auto-imported — no manual imports needed
  • ✅ *Safe fallbacks* — all calls silently no-op in browser (perfect for hybrid apps)

Install

npm install nuxtjs-tauri
# pnpm add nuxtjs-tauri
# yarn add nuxtjs-tauri

Peer dependency: @tauri-apps/api >= 2.0.0 must be installed in your project.

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxtjs-tauri'],
})

That's it. ssr: false is set automatically and all composables are available globally.


Composables

useTauri()

Core composable. Provides isTauri (reactive) and invoke().

<script setup>
const { isTauri, invoke } = useTauri()

// Type-safe Rust command call
const greeting = await invoke<string>('greet', { name: 'World' })

// Guard for Tauri-only UI
</script>

<template>
  <div v-if="isTauri">
    Running as desktop app
  </div>
</template>

useTauriWindow()

Native window controls via @tauri-apps/api/window. No additional Rust plugins required.

<script setup>
const { minimize, toggleMaximize, close, setTitle, setFullscreen } = useTauriWindow()
</script>

<template>
  <!-- Custom titlebar -->
  <div class="titlebar" data-tauri-drag-region>
    <button @click="minimize">_</button>
    <button @click="toggleMaximize">□</button>
    <button @click="close">✕</button>
  </div>
</template>

| Method | Description | |---|---| | minimize() | Minimizes the window | | maximize() | Maximizes the window | | unmaximize() | Restores the window | | toggleMaximize() | Toggle maximize/restore | | close() | Closes the window | | hide() | Hides the window from taskbar | | show() | Shows a hidden window | | setTitle(title) | Sets the window title | | setFullscreen(bool) | Enter/exit fullscreen | | isMaximized() | Resolves true if maximized | | isFullscreen() | Resolves true if fullscreen |

useTauriNotification()

Native desktop notifications via tauri-plugin-notification.

Requires in Cargo.toml:

tauri-plugin-notification = "2"

And registered in lib.rs:

.plugin(tauri_plugin_notification::init())
<script setup>
const { send } = useTauriNotification()

async function notifyOrderReady() {
  await send({
    title: 'Order ready!',
    body: 'Table 4 is served.',
  })
}
</script>

| Method | Returns | Description | |---|---|---| | send({ title, body?, icon? }) | Promise<void> | Send notification (auto-requests permission) | | isPermissionGranted() | Promise<boolean> | Check current permission | | requestPermission() | Promise<boolean> | Request notification permission |


Options

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['nuxtjs-tauri'],
  tauri: {
    // Set to true only if you manage ssr:false yourself
    disableSsr: true, // default: true
  },
})

How it works with your Rust backend

Everything goes through Tauri's standard invoke() bridge. Register commands in Rust:

// src-tauri/src/lib.rs
#[tauri::command]
fn greet(name: &str) -> String {
    format!("Hello, {}!", name)
}

pub fn run() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![greet])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}

Call from your Vue component:

const { invoke } = useTauri()
const msg = await invoke<string>('greet', { name: 'Chahine' })
// → "Hello, Chahine!"

Hybrid apps (Tauri + Browser)

All composables are safe to call in the browser — they return null/undefined or no-op, so you can ship the same codebase for both browser and desktop:

const { isTauri, invoke } = useTauri()

// Only invoke if running in Tauri
if (isTauri.value) {
  const result = await invoke('native_command')
}

Requirements

| | Version | |---|---| | Nuxt | ≥ 3.0.0 | | Tauri | v2 | | @tauri-apps/api | ≥ 2.0.0 |


License

MIT © Chahine Brini


Part of the open-source toolkit at chahine-brini.com. Also check out nuxt-ui-star-rating.