# vdt

> A template engine based on virtual dom library misstime

Latest version **3.0.46** (published 2026-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install vdt
pnpm add vdt
yarn add vdt
bun add vdt
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.0.46 |
| Published | 2026-03-31 |
| First published | 2015-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 372.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 58 |
| Maintainers | javey, warrior-bing |

## Links

- npm: https://www.npmjs.com/package/vdt
- Repository: https://github.com/Javey/Intact
- Homepage: https://github.com/Javey/Intact#readme
- Issues: https://github.com/Javey/Intact/issues
- npm.io page: https://npm.io/package/vdt

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) ^2.2.0
- [misstime](https://npm.io/package/misstime.md) ^3.0.46
- [intact-shared](https://npm.io/package/intact-shared.md) ^3.0.46

## Recent versions

- 3.0.46 (latest) — 2026-03-31
- 3.0.45 (beta) — 2025-11-26
- 3.0.44 — 2025-09-02
- 3.0.43 — 2025-09-01
- 3.0.42 — 2025-08-28
- 3.0.42-beta.1 — 2025-08-05
- 3.0.41 — 2025-07-24
- 3.0.40 — 2025-01-21
- 3.0.39 — 2024-08-15
- 3.0.38 — 2024-08-07
- 3.0.37 — 2024-06-03
- 3.0.36 — 2024-05-23
- 3.0.35 — 2024-05-22
- 3.0.34 — 2024-04-12
- 3.0.33 — 2024-03-15
- … 164 more at https://npm.io/package/vdt/versions

## README

# Vdt.js

[![npm version](https://badge.fury.io/js/vdt.svg)](https://badge.fury.io/js/vdt)
[![Build Status](https://travis-ci.org/Javey/vdt.js.svg?branch=master)](https://travis-ci.org/Javey/vdt.js)

一个基于虚拟DOM的模板引擎，详情请访问：[Documents](http://javey.github.io/vdt.html)

![Benchmark](/assets/benchmark-update.png 'Benchmark')

## 功能特性

* 基于虚拟DOM，更新速度快
* 支持模板继承，包含，宏定义等功能
* 文件大小在gzip压缩后大概13KB（包含浏览器实时编译模块）
* 支持前后端渲染

## 安装

```shell
npm install vdt --save
```

## 示例

```jsx
<div>
    <h1>{title}</h1>
    <div ev-click={onClick.bind(self)}>Clicked: {count}</div>
    <ul v-for={items}>
        <li>{key}: {value}</li>
    </ul>
</div>
```

```js
var vdt = Vdt(template);
var dom = vdt.render({
    title: 'vdt',
    items: {
        a: 1,
        b: 2
    },
    count: 0,

    onClick: function() {
        this.count++;
        vdt.update();
    }
});

document.body.appendChild(dom);
```

## 相关库

1. [misstime](https://github.com/Javey/misstime) vdt基于的virtual dom库
2. [Intact](http://javey.github.io/intact/) 基于vdt的mvvm框架
3. [vdt-loader](https://github.com/Javey/vdt-loader) vdt模板文件的webpack loader

## 基准测试 

See [Benchmark](http://javey.github.io/vdt.html#/benchmark)

## 许可

MIT

---
_Source: https://npm.io/package/vdt · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
