Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

riot

Package Overview
Dependencies
Maintainers
4
Versions
280
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

riot

A React-like user interface micro-library

  • 3.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.9K
increased by22.13%
Maintainers
4
Weekly downloads
 
Created
Source

Riot logo

Simple and elegant component-based UI library

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

NPM version NPM downloads MIT License Coverage Status Code Quality

Sauce Test Status

Framework Size Comparison

FrameworkVersionMinified Size (gzip)
Angular22too much
Ember2.11.0131.01kb
Angular1.6.157.99kb
Polymer + Web Components Polyfill Lite1.7.050.25kb
React15.4.245.06kb
Web Components Polyfill0.7.2233.68kb
Vue2.1.1026.49kb
Riot3.1.010.20kb
Inferno1.2.29.17kb
Preact7.2.03.94kb

Browsers support

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

  • IE 9+
  • Edge
  • Chrome
  • Safari 7+
  • Firefox
  • Chrome
  • 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 jQuery.

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

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 git@github.com: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 ( it requires ctrl+c to exit )
$ 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 :heart: by many smart people from all over the world. Thanks to all the contributors
It's actively maintained by:

Buy us a coffee :coffee:

Click here to lend your support to: Riot and make a donation at pledgie.com !

http://riotjs.com/

Keywords

FAQs

Package last updated on 29 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc