GithubHelp home page GithubHelp logo

baudryj / riot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from riot/riot

0.0 2.0 0.0 8.84 MB

Simple and elegant component-based UI library

Home Page: https://riot.js.org

License: Other

Makefile 0.40% JavaScript 93.55% HTML 6.03% CSS 0.01%

riot's Introduction

Riot logo

Simple and elegant component-based UI library

Build Status MIT License Riot Forum Join the chat at https://gitter.im/riot/riot Join the chat (ja) at https://riot-jp-slackin.herokuapp.com/ OpenCollective Backers OpenCollective Sponsors

NPM version NPM downloads jsDelivr Hits Coverage Status Riot Size Code Quality

Sauce Test Status

Framework Size Comparison

Framework Version Minified Size (gzip)
@angular/core + Polyfills 7.0.0 314.18kb
Ember 2.18.2 121.84kb
Polymer + Web Components Polyfill Lite 1.8.0 66.3kb
Polymer + webcomponents-loader.js + webcomponents-bundle.js 3.0.0 45.70kb
React + Map and Set Polyfills 16.5.2 44.75kb
Web Components Polyfill 0.7.24 33.68kb
Vue 2.5.17 31.65kb
Riot 3.13.1 10.85kb
Inferno 6.0.0 7.65kb
Preact 8.3.1 3.48kb

The above comparison includes polyfills to support old browsers like IE9 that in Riot.js are supported by default.

Browsers support

Riot is supported by all modern browsers and it does not require any additional polyfill

  • IE 9+
  • Edge
  • Chrome
  • Safari 7+
  • Firefox
  • Safari iOS
  • Android

Custom tags • Concise syntax • Simple API • Tiny Size

Riot brings custom tags to all modern browsers. Think React + Polymer but with enjoyable syntax and a small learning curve.

Tag definition

<timer>

  <p>Seconds Elapsed: { time }</p>

  this.time = opts.start || 0

  tick() {
    this.update({ time: ++this.time })
  }

  var timer = setInterval(this.tick, 1000)

  this.on('unmount', function() {
    clearInterval(timer)
  })

</timer>

Open this example on Plunker

Mounting

riot.mount('timer', { start: 0 })

Nesting

Custom tags lets you build complex views with HTML.

<timetable>
  <timer start="0"></timer>
  <timer start="10"></timer>
  <timer start="20"></timer>
</timetable>

HTML syntax is the de facto language on the web and it's designed for building user interfaces. The syntax is explicit, nesting is inherent to the language and attributes offer a clean way to provide options for custom tags.

Expressions Bindings

  • Absolutely the smallest possible amount of DOM updates and reflows.
  • One way data flow: updates and unmounts are propagated downwards from parent to children.
  • Expressions are pre-compiled and cached for high performance.
  • Lifecycle events for more control.

Close to standards

  • No proprietary event system.
  • Event normalization.
  • The rendered DOM can be freely manipulated with other tools.
  • No extra HTML root elements or data- attributes.
  • Plays well with any frontend framework.

Use your dearest language and tools

Note: * officially maintained

CDN hosting

Concise syntax

  • Power shortcuts: class={ enabled: is_enabled, hidden: hasErrors() }.
  • No extra brain load such as render, state, or constructor.
  • Interpolation: Add #{ items.length + 1 } or class="item { selected: flag }"
  • Compact ES6 method syntax.

Demos

Books

Tutorials

Video Tutorials

Libraries / Frameworks

Components

Resources

Performance

Miscellaneous

Editors / Editor Plugins (Syntax highlighting, autcompletion, etc...)

How to contribute

If you are reading this it's already a good sign and we are thankful for it! We try our best working as much as we could on riot but your help is always appreciated.

If you want to contribute to riot helping us maintaining the project please check first the list of our open issues to understand whether there is a task where you could help.

Riot is mainly developed on UNIX systems so you will be able to run all the commands necessary to build and test the library using our Makefile. If you are on a Microsoft machine it could be harder to set up you development environment properly.

Following the steps below you should be able to properly submit your patch to the project

1) Clone the repo and browse to the riot folder

$ git clone [email protected]:riot/riot.git && cd riot

2) Set up your git branch

$ git checkout -b feature/my-awesome-patch

3) Install the npm dependencies

$ npm i

4) Build and test riot using the Makefile

# To build and test riot
$ make riot

# To build without testing
$ make raw

# To build anytime you change a src file
$ make watch

# To bench riot
$ make perf

5) Pull request only against the dev branch making sure you have read our pull request template

6) Be patient

Credits

Riot is made with ❤️ by many smart people from all over the world. Thanks to all the contributors
It's actively maintained by:


Gianluca Guarini

Official Website

http://riot.js.org

Backers

Support us with a monthly donation and help us continue our activities. Become a backer

Backers

Sponsors

Become a sponsor to get your logo on our README. Become a sponsor

Sponsors

Thanks

Special thanks to Browserstack for their support

browser stack

riot's People

Contributors

gianlucaguarini avatar tipiirai avatar aurri avatar cognitom avatar rsbondi avatar amarcruz avatar nippur72 avatar 3den avatar ashbrener avatar rogueg avatar speier avatar pakastin avatar avnerus avatar gregorypratt avatar antonheryanto avatar a-moses avatar andynemzek avatar 5angel avatar crisward avatar shime avatar andyvanee avatar txchen avatar andreasheintze avatar r4j4h avatar emehrkay avatar vitogit avatar wellguimaraes avatar marciojcoelho avatar mike-ward avatar bminer avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.