This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@schukai/component-state

2.4.3 • Public • Published

State

State is a lightweight, robust and easy-to-use form library with modest ambitions. The component easily integrates with your existing websites without taking over everything.

One design target is to reach the shiny sun with as little JavaScript as possible.

Monster was built with ES6 modules and uses import
and export.

For some functions, you need additional polyfills.

Documentation

To check out docs and examples, visit monsterjs.org/en/doc/component-state.

Installation

npm install @schukai/component-state, yarn install @schukai/component-state or pnpm install @schukai/component-state

Usage

A simple example of the use of functionality from Monster. We create a small file index.mjs. The m in .mjs stands for module. In the example we want to make substitutions in a string.

// create element
const state = document.createElement('monster-state');

// insert element into the DOM
document.getElementById('body').appendChild(state);

// Label
state.setOption('slot.content','No results found');

To integrate this function into a website it is recommended to use a bundler like esbuild.

esbuild index.mjs --outfile dist.js

We can now integrate that into our website.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Monster</title>
    <script src="dist.js"></script>
</head>
<body>

Voila!

Polyfill

We do try to work around some browser bugs, but on the whole we don't use polyfills and feature detection.

However, many functions can be mapped via polyfill.io and thus the compatibility can be increased.

   <script id="polyfill" src="https://polyfill.io/v3/polyfill.min.js?features=document,Object.assign,Symbol"
       crossorigin="anonymous"
       referrerpolicy="no-referrer"></script>

Questions

For questions and commercial support, please contact schukai GmbH. The issue list of this repo is exclusively for bug reports and feature requests.

Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

License

© schukai GmbH, Released under the AGPL 3.0 License.

AGPL

You can also purchase a commercial license.

Changelog

Detailed changes for each release are documented in the CHANGELOG.

Package Sidebar

Install

npm i @schukai/component-state

Weekly Downloads

0

Version

2.4.3

License

AGPL 3.0

Unpacked Size

965 kB

Total Files

23

Last publish

Collaborators

  • volker.schukai