> ## Documentation Index
> Fetch the complete documentation index at: https://webview.js.org/llms.txt
> Use this file to discover all available pages before exploring further.

# WebviewJS: Native Webview Library for Node.js, Deno, and Bun

> Get started with @webviewjs/webview — a Rust-powered native binding that brings real OS windows, IPC, menus, tray icons, and notifications to Node.js.

Welcome to the WebviewJS documentation. `@webviewjs/webview` is a Rust-powered native binding to [tao](https://github.com/tauri-apps/tao) and [wry](https://github.com/tauri-apps/wry) that lets you build desktop applications using Node.js, Deno, or Bun — with real OS windows, the system webview engine, IPC, menus, tray icons, and desktop notifications. Get started in minutes with a single `npm install`, no Rust toolchain required.

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/quickstart">
    Open a native window and load content in under five minutes.
  </Card>

  <Card title="IPC & Expose" icon="arrows-left-right" href="/guides/ipc-messaging">
    Send messages and call Node.js functions from the browser page.
  </Card>

  <Card title="API Reference" icon="code" href="/api/application">
    Full reference for Application, BrowserWindow, Webview, and more.
  </Card>

  <Card title="Build Executables" icon="box" href="/guides/building-executables">
    Compile your app to a single self-contained binary with the `webview` CLI.
  </Card>
</CardGroup>

## Core capabilities

<CardGroup cols={3}>
  <Card title="Windows & Webviews" icon="browser" href="/api/browser-window">
    Create, resize, and style native OS windows. Embed any URL or inline HTML using the OS's own WebKit / WebView2 engine.
  </Card>

  <Card title="IPC Messaging" icon="message" href="/guides/ipc-messaging">
    Page-to-Node messaging via `window.ipc.postMessage()` and typed async function namespaces via `webview.expose()`.
  </Card>

  <Card title="Custom Protocols" icon="link" href="/guides/custom-protocols">
    Handle `app://` and other custom schemes with a Fetch-compatible handler. Compatible with Hono, itty-router, and similar frameworks.
  </Card>

  <Card title="Native Menus" icon="bars" href="/guides/menus">
    Build cross-platform menu bars with accelerators, roles, separators, and per-window or global menus.
  </Card>

  <Card title="System Tray" icon="bell" href="/api/tray">
    Add tray icons with menus, tooltips, and pointer event listeners on Windows, macOS, and Linux.
  </Card>

  <Card title="Desktop Notifications" icon="bell-ring" href="/api/notification">
    Show native OS notifications with a browser-familiar `Notification` API. Permission is always `"granted"`.
  </Card>
</CardGroup>

## Hello, world

The minimal WebviewJS application — a native window loading a URL:

```js app.mjs theme={null}
import { Application } from '@webviewjs/webview';

const app = new Application();

let mainWindow = null;
let mainWebview = null;

app.whenReady().then(() => {
  mainWindow = app.createBrowserWindow({
    title: 'Hello, WebviewJS',
    width: 1024,
    height: 768,
  });

  mainWebview = mainWindow.createWebview({
    url: 'https://nodejs.org',
  });

  app.on('application-close-requested', () => app.exit());
});
```

Run it with `node app.mjs`. A native window opens. Close it to exit.
