vitemple / docs
TYPESCRIPT-FIRST · NO VIRTUAL DOM

Small components.
Native HTML.

The HTML you know.
Reactive as you need.

Bring HTML, CSS and TypeScript together with a simple <slot> . Add a shared reactive store. Ship a page the browser already understands.

npm install vitemple
A small compiler. A familiar way to build.
01 / COMPOSE Build-time imports
src/index.html
<html>
<body>
  <slot src="./hello.html"
        name="world" />
</body>
</html>
↓ Resolved at build time
src/hello.html
<h1>Hello, {name}!</h1>
↓ {name} → world
dist/index.html · compiled heading
<html>
<body>
  <h1>Hello, world!</h1>
</body>
</html>
● ● ● localhost / your first component ↗
02 / IN THE BROWSER

Hello, world!

Real HTML. Ready to serve.

✓   Component imported
HTML + CSS + TypeScript → static HTML
01

Compose with slots

Import components with one HTML tag. Pass attributes to make each instance your own.

02

Share a little state

One built-in store connects your components. Update state and subscribe where you need it.

03

Ship native HTML

No virtual DOM. A compact page, native browser APIs and the freedom of static hosting.

START SMALL. MAKE IT YOURS.

Your first slot,
step by step.

From an empty folder to a working Hello World.
Every file, every command, every result.

Open the quick start →
01

Set up your project

Install Vitemple and add your commands.

↗
02

Create a component

Write HTML. Import it through a slot.

↗
ONE STORE. TWO COMPONENTS.

Try a shared state.

Change either counter. Both components update through the same Vitemple store.

Understand the store →
Component A
0
Subscribed to the same store
Component B
0
Subscribed to the same store