Skip to content

A miniature UI development library to quickly prototype small websites. Check ->

License

Notifications You must be signed in to change notification settings

SkyIsTheLimit/mewui

Repository files navigation

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);

About

A miniature UI development library to quickly prototype small websites. Check ->

Resources

License

Stars

Watchers

Forks

Packages

No packages published