0.0.4 • Published 4 years ago

mewui v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

MewUI

A miniature UI development library to quickly prototype small websites.

Installation

npm install mewui

OR

yarn add mewui

Usage

MewUI is used to quickly make your DOM reactive.

import { Mew } from 'mewui';

interface CurrentTimeModel {
  currentTime: string;
}

// Create the view model.
const vm = new Mew<CurrentTimeModel>(`
  <div class="clock">
    <p>The current time is :currentTime</p>
  </div>
`).apply({
  currentTime: 'Current Time Loading . . .',
});

// Append the template to the DOM.
vm.el().appendTo(document.body);

setInterval(() => {
  // Update the values on the view model and see it update on the DOM automatically.
  vm.currentTime = new Date().toLocaleTimeString();
}, 10);
0.0.3

4 years ago

0.0.2

4 years ago

0.0.4

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago