@onephrase/play-ui

0.1.2 • Public • Published

The resilient, jQuery-inspired DOM abstraction layer and a UI manipulation library.

PlayUI

NPM version NPM downloads Patreon donate button

PlayUI provides utilities for easing DOM-related concerns, UI manipulation, events and gestures, animations, and more. It offers a minimal footprint with concise APIs that let the platform speak for itself.

Usage

PlayUI can be used as a constructible function (like the jQuery function).

// If PlayUI was installed via npm
import $ from '@web-native-js/play-ui';

// If PlayUI was loaded via a script tag
const $ = window.WebNative.PlayUI;

// Bind to user gestures
$(el1).on('doubletap', e => {
    // Play... then...
    $(el2).play({opacity: 0}).then($el2 => $el2.css('display', 'none'));
});

PlayUI's core functions may also be imported individually to use in a project.

import on from '@web-native-js/play-ui/src/evt/on.js';
import play from '@web-native-js/play-ui/src/ani/play.js';
import cssAsync from '@web-native-js/play-ui/src/css/cssAsync.js';

// Bind to user gestures
on(el1, 'doubletap', e => {
    // Play... then...
    play(el2, {opacity: 0}).then(el2 => cssAsync(el2, 'display', 'none'));
});

Documentation

Issues

To report bugs or request features, please submit an issue.

License

MIT.

Package Sidebar

Install

npm i @onephrase/play-ui

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

1.08 MB

Total Files

107

Last publish

Collaborators

  • ox-harris