Skip to content

Installation

The fastest way to start:

Terminal window
# npm
npm create whisq@latest my-app
# pnpm
pnpm create whisq my-app
# bun
bun create Whisq my-app

This creates a project with Vite, TypeScript, and a counter example.

Terminal window
# npm
npm install @whisq/core
# pnpm
pnpm add @whisq/core
# yarn
yarn add @whisq/core
# bun
bun add @whisq/core

If you already have a Vite project, just install the package — no plugin needed for basic usage:

Terminal window
npm install @whisq/core
src/main.ts
import { signal, div, button, span, mount } from "@whisq/core";
const count = signal(0);
mount(
div(
button({ onclick: () => count.value++ }, "Click me"),
span(() => `Count: ${count.value}`),
),
document.getElementById("app")!,
);

For file-based routing, add the Vite plugin:

Terminal window
npm install @whisq/vite-plugin
vite.config.ts
import { defineConfig } from "vite";
import { Whisq } from "@whisq/vite-plugin";
export default defineConfig({
plugins: [Whisq()],
});

Whisq is written in TypeScript and ships with types. Recommended tsconfig.json:

{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"isolatedModules": true
},
"include": ["src"]
}

For prototyping or small projects, use Whisq directly via CDN:

<!DOCTYPE html>
<html>
<body>
<div id="app"></div>
<script type="module">
import {
signal, div, button, span, mount
} from "https://esm.sh/@whisq/core";
const count = signal(0);
mount(
div(
button({ onclick: () => count.value++ }, "+"),
span(() => ` ${count.value} `),
),
document.getElementById("app"),
);
</script>
</body>
</html>
PackagePurposeInstall
@whisq/routerClient-side routingnpm i @whisq/router
@whisq/ssrServer-side renderingnpm i @whisq/ssr
@whisq/testingComponent testingnpm i -D @whisq/testing
@whisq/vite-pluginFile routing, HMRnpm i -D @whisq/vite-plugin
@whisq/devtoolsRuntime debuggingnpm i -D @whisq/devtools