All Projects → Mevrael → Bunny

Mevrael / Bunny

Licence: mit
BunnyJS - Lightweight native (vanilla) JavaScript (JS) and ECMAScript 6 (ES6) browser library, package of small stand-alone components without dependencies: FormData, upload, image preview, HTML5 validation, Autocomplete, Dropdown, Calendar, Datepicker, Ajax, Datatable, Pagination, URL, Template engine, Element positioning, smooth scrolling, routing, inversion of control and more. Simple syntax and architecture. Next generation jQuery and front-end framework. Documentation and examples available.

Programming Languages

javascript
184084 projects - #8 most used programming language
es6
455 projects

Projects that are alternatives of or similar to Bunny

Just Validate
Lightweight (~4,5kb gzip) form validation in Javascript Vanilla, without dependencies, with customizable rules (including remote validation), customizable messages and customizable submit form with ajax helper.
Stars: ✭ 74 (-84.36%)
Mutual labels:  validation, form-validation, form, vanilla-javascript
Form Validation.js
The most customizable validation framework for JavaScript.
Stars: ✭ 127 (-73.15%)
Mutual labels:  validation, form-validation, form
Approvejs
A simple JavaScript validation library that doesn't interfere
Stars: ✭ 336 (-28.96%)
Mutual labels:  validation, form-validation, form
Redux Form
A Higher Order Component using react-redux to keep form state in a Redux store
Stars: ✭ 12,597 (+2563.21%)
Mutual labels:  validation, form-validation, form
Vanilla Datatables
A lightweight, dependency-free javascript HTML table plugin
Stars: ✭ 314 (-33.62%)
Mutual labels:  datatable, vanilla-js, vanilla-javascript
React Form With Constraints
Simple form validation for React
Stars: ✭ 117 (-75.26%)
Mutual labels:  validation, form-validation, form
Neoform
✅ React form state management and validation
Stars: ✭ 162 (-65.75%)
Mutual labels:  validation, form-validation, form
Lcformvalidation
Javascript based form validation library, third party library / framework agnostic.
Stars: ✭ 58 (-87.74%)
Mutual labels:  validation, library, form-validation
Svelte Forms Lib
📝. A lightweight library for managing forms in Svelte
Stars: ✭ 238 (-49.68%)
Mutual labels:  validation, library, form-validation
curved-menu
VanillaJS fully configurable curved menu (circular navigation)
Stars: ✭ 30 (-93.66%)
Mutual labels:  vanilla, vanilla-javascript, vanilla-js
formalizer
React hooks based form validation made for humans.
Stars: ✭ 12 (-97.46%)
Mutual labels:  validation, form, form-validation
Bootstrap Validate
A simple Form Validation Library for Bootstrap 3 and Bootstrap 4 not depending on jQuery.
Stars: ✭ 112 (-76.32%)
Mutual labels:  validation, form-validation, form
Legit
input validation framework
Stars: ✭ 81 (-82.88%)
Mutual labels:  validation, form-validation, form
Ratifier
Ratifier is a form validation library for Android.
Stars: ✭ 123 (-74%)
Mutual labels:  validation, library, form
svelte-form
JSON Schema form for Svelte v3
Stars: ✭ 47 (-90.06%)
Mutual labels:  validation, form, form-validation
Formhelper
ASP.NET Core - Transform server-side validations to client-side without writing any javascript code. (Compatible with Fluent Validation)
Stars: ✭ 155 (-67.23%)
Mutual labels:  validation, form-validation, form
Ok
✔️ A tiny TypeScript library for form validation
Stars: ✭ 34 (-92.81%)
Mutual labels:  validation, form-validation, form
Usetheform
React library for composing declarative forms, manage their state, handling their validation and much more.
Stars: ✭ 40 (-91.54%)
Mutual labels:  validation, form-validation, form
Resolvers
📋 Validation resolvers: Zod, Yup, Joi, Superstruct, and Vest.
Stars: ✭ 222 (-53.07%)
Mutual labels:  validation, form-validation, form
ng-sq-ui
Flexible and easily customizable UI-kit for Angular 11+
Stars: ✭ 99 (-79.07%)
Mutual labels:  autocomplete, datepicker, form

BunnyJS Logo

BunnyJS v 0.14.42 (Beta)

Website * NPM downloads/month NPM version * Gitter chat * Contribute to Docs * Assets Builder

ES6 browser framework

"Powerful like React, simple like jQuery"

BunnyJS is a modern Vanilla JS and ES6 library and next-generation front-end framework, package of small stand-alone components without dependencies.

  • No dependencies - can be used in any project anywhere anytime
  • 0 learning curve - you can start right now, just plain JavaScript with simple architecture easy to maintain and extend
  • Designed in mind to build modern, complicated, real world business apps
  • Faster, simpler, enjoyable than any frontend framework
  • Large set of ready components, custom UI elements and utils
  • LTS

For help & ideas - DM me on Twitter

Browser support

IE9+, last 2 versions of Chrome, Firefox, Safari, Android 4.4+, iOS 9+

Installation

  1. Install via npm install bunnyjs --save
  2. Rollup.js with babel and npm plugins is recommended for transpiling and bundling.
  3. Or you can just use Assets Builder which will automatically build your future JS and CSS with 1 command.
  4. Or just include into HTML already transpiled and minified JS from dists folder or any CDN.
  5. Probably some polyfills for IE might be required depending on Component.
<script src="https://unpkg.com/bunnyjs/dist/..."></script>

Extending BunnyJS and Vanilla JS objects

Recommended way to use any of BunnyJS component is - "do not change the code you do not own". That means do not modify native prototypes or any 3rd party code.

  1. Create some base or core folder in your app,
  2. Extend BunnyJS objects with Object.assign() or Object.create
  3. Now everywhere in your project import custom file and not directly BunnyJS's file.
import { Component as BunnyComponent } from 'bunnyjs/src/...';

export const Component = Object.assign({}, BunnyComponent, {

    init(arg) {
        // do whatever you want
        console.log(arg);

        // call default (parent)
        return BunnyComponent.init(arg);
    }

});

Components

  1. Form processing with native API, AJAX submit, file upload, image preview, data binding and more
  2. Native HTML5 form validation (View example)
  3. Facebook-like Messenger
  4. Custom selects, spinners,
  5. DOM utils, ready(), events
  6. Libraries for Date, URL, File, Image
  7. Ajax, APIs
  8. Routing
  9. Template engine
  10. DataTable and Pagination (View example)
  11. Calendar and DatePicker
  12. Autocomplete, Dropdown
  13. Element, positions, coordinates, smooth scrolling
  14. Dependency Injection, Inversion of control

Architecture

  1. Separation of concerns, loose coupling, modularity
  2. Functional programming
  3. ES6 import/exports, Promises
  4. Native Browser API, polyfills were needed
  5. Object literal notation, no prototypes, "classes" , "new"
  6. Object composition over inheritance
  7. Dependency injection

Contributors wanted

  • Become a contributor of a fast growing open source project
  • Share your ideas to the world
  • Help yourself and millions of developers around the world solving JavaScript fatigue and modern overendineered problem
  • Help building a tool which will provide a best user experience, performance, security, durability and load time for billions of the Internet users with smart usage of Computer's and Mobile device's resources

Local development, examples and dists generation

  • Make sure to install npm install assets-builder first.
  • Examples are located in the examples folder. File index.html can be opened in the browser to view examples. Examples are generated with npm build
  • To generate dists - npm build dist -p

Experimental components based on DOMObserver (Mutation Observer)

Learn how to build Vanilla JavaScript components on Medium.

src/DOMObserver may be used to listen for DOM events like when new tag (component) was inserted into DOM or removed. It is based on latest Mutation Observer API (IE11+) and allows to automatically init components inserted into DOM later.

BunnyJS provides an experimental base abstract src/Component which may be used to create custom components:

<script src="https://unpkg.com/bunnyjs/dist/component.min.js"></script>

Below is Clock example from Inferno. As you can see you can do everything in Vanilla JS with less code, size and it works natively.

const MyClock = Object.assign({}, Component, {

  tagName: 'clock',

  attributes: {
    date: new Date,
  },

  addEvents(clock) {
    clock._timer = setInterval(() => {
      clock.date = new Date;
    }, 1000);
  },

  uninit(clock) {
    clearInterval(clock._timer);
  },

  __date(clock, newVal) {
    clock.textContent = newVal.toLocaleTimeString();
  }

});

MyClock.register();

Now just document.body.appendChild(document.createElement('clock')) and it works.

To update the whole "state" of the component you may just use Vanilla JS Object.assign(component, {stateObject}).

For example, you have a simple clicker. By clicking on it btn.counter is increased. You can update counter with btn.counter = 1 or Object.assign(document.getElementsByTagName('btn')[0], {counter: 1});

You may also set default counter value with <btn counter="6">

For more examples look in examples/component folder.


© Mev-Rael

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].