dunajs

A simple set of javascript controls

Usage no npm install needed!

<script type="module">
  import dunajs from 'https://cdn.skypack.dev/dunajs';
</script>

README

Duna.js

Duna offers a small collection of javascript controls.

Installation

In-browser usage:

<script src="duna.js"></script>

Through NPM:

npm install dunajs

Usage

All current controls has two syntaxes of initialization:

// by element
new duna.ui.[ControlName](element, options);

// by css selector
duna.ui.[ControlName].from(selector, options);

In-browser usage:

<script src="duna.js"></script>
<script>
    new duna.ui.NumericBox(document.getElementById("some"), {...})
</script>

On NPM:

import duna from 'dunajs';

// e.g. using the css selector
duna.ui.Limiter.from("[maxlength]", { ... })

It's also possible to load only what do you need:

import { SearchBox } from 'dunajs/ui/SearchBox';

new SearchBox(element, options);

Build and Examples

Clone the project.

Run the follow command lines:

npm install
npm run dev

Available Controls

Currently there are four available controls in the library.

  • NumericBox
  • SearchBox
  • MaskEdit
  • Limiter

Documentation

Check out the wiki pages.

Credits

The Duna.js project is in development by Alexandre T. Perez under MIT License.