Introducing
The Slant team built an AI & it’s awesome
Find the best product instantly
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now
4.7 star rating
0
Development
Frontend Development
What are the best lightweight JavaScript UI libraries?
9
Options
Considered
46
User
Recs.
Mar 1, 2023
Last
Updated
Related Questions
Activity
Have feedback or ideas?
Join our community
on Discord
Ad
9
Options
Considered
Best lightweight JavaScript UI libraries
Price
GZipped size
Platforms
54
Riot
Free
10.39KB
Android, iOS, Web, Linux, macOS, Windows, Electron
--
Blocks.js
-
16.5K
-
--
w2ui
-
-
-
--
Deku
-
-
-
--
Webix
$0-$469
-
-
See Full List
54
Riot
My Rec
ommendation
for
Riot
My Recommendation for
Riot
All
6
Pros
5
Specs
Top
Pro
•••
Lightweight
Riot is made to be used with websites of any kind, so it's built to be easy and lightweight, but still maintaining all the needed features for a UI library. It's only 2.5 KB in size when minified. So it can also be used for mobile web apps without requiring much bandwidth to download.
See More
Specs
GZipped size:
10.39KB
Platforms:
Android, iOS, Web, Linux, macOS, Windows, Electron
License:
free open-source software
Search:
yes
See All Specs
Top
Pro
•••
Components use familiar HTML tags
Riot components use custom tags which are nothing more than familiar HTML tags coupled with JavaScript. This eliminates the need to learn another templating language or syntax. For example: <todo> <h3>TODO</h3> <ul> <li each={ item, i in items }>{ item }</li> </ul> <form onsubmit={ handleSubmit }> <input> <button>Add #{ items.length + 1 }</button> </form> this.items = [] handleSubmit(e) { var input = e.target[0] this.items.push(input.value) input.value = '' } </todo> Riot tries to separate HTML and JavaScript, while still keeping them inside the component. This way, the HTML can also be neatly mixed with JavaScript expressions.
See More
Top
Pro
•••
Minimal DOM operations
Riot takes the expressions from a DOM tree and stores them in an array. Each of these expressions points to a DOM node. On each cycle these expressions are compared to the values in the DOM. So when a value has changed, Riot automatically updates the corresponding node. This way the operations are kept to a minimal amount and since the expressions can be cached, going through 1000 of them takes less than 1ms.
See More
Top
Pro
•••
Supports server side rendering
Riot has support for server side rendering. The views and data are rendered on the server, then those views are sent as HTML to the browser when a user requests them. This helps with initial loading time and is very useful for SEO purposes because the web app is indexed by search engines same as other static websites that have their HTML on the server.
See More
Top
Pro
•••
Separation of concerns with RiotControl
RiotControl is inspired by Facebook's Flux Architecture Pattern and it's a simple Central Event Controller/Dispatcher for Riot. It's extremely lightweight (like Riot itself) but unfortunately passes up on some features in favor of performance and simplicity. RiotControl helps with storing the stater of the application, by passing events from views to stores and vice-versa. Stores can communicate with many views and views can do the same with many stores, this enables to clearly separate concerns and inter-component communication.
See More
Hide
See All
Free
Recommend
21
3
--
Blocks.js
My Rec
ommendation
for
Blocks.js
My Recommendation for
Blocks.js
All
4
Pros
2
Cons
1
Specs
Top
Pro
•••
Small footprint
Blocks.js is just 16.5KB minified and gzipped. So it's pretty small.
See More
Top
Con
•••
Relatively new
Blocks.js is a relatively new library. It doesn't have much support and there re not many people who use it. So if you run into any problems it would be hard to get solutions.
See More
Specs
GZipped size:
16.5K
Top
Pro
•••
Modular structure
Apps developed with blocks.js are modular in structure and make use of reusable objects. This makes these applications very maintainable.
See More
Hide
See All
Get it
here
Recommend
5
--
w2ui
My Rec
ommendation
for
w2ui
My Recommendation for
w2ui
All
3
Pros
3
Top
Pro
•••
Easy and clean API
Any component is well documented and have an easy API to access validation, dataloading and handling user events.
See More
Top
Pro
•••
Lots of components/widgets
Library contains UI components like Datagrids, Forms, Tabs, SideBars, Toolbars and more.
See More
Top
Pro
•••
Small library size
Only two files need to be included 1 .css and 1 .js, together they are only 365 kb. regarding to amount of components it is very small.
See More
Hide
See All
Get it
here
Recommend
3
--
Deku
My Rec
ommendation
for
Deku
My Recommendation for
Deku
All
6
Pros
4
Cons
2
Top
Pro
•••
Easy to learn
Since Deku is very lightweight and has a rather small API, there's not much to learn. It's pretty easy to get started and build something with it.
See More
Top
Con
•••
No support for legacy browsers
Deku does not support legacy browsers, or relatively old browsers for that matter. They only support the latest versions of the major web browsers.
See More
Top
Pro
•••
Server side rendering
Deku can render it's components and data server side, then it sends those components as HTML to the browser. This ensures faster initial loading time and SEO friendliness out of the box, since it's indexed as any other static website by search engines.
See More
Top
Con
•••
Not a lot of learning resources
Since it's a rather new library and has a small community, there are not many examples where you can learn from out there. There are also few guides and the documentation is not amazing and has some parts that should be covered better.
See More
Top
Pro
•••
Good performance
Deku's diffing algorithm is considerably faster and performs better than most libraries. The dbmonster performance mini-app written in Deku renders roughly 16% faster than other libraries.
See More
Top
Pro
•••
Can use JSX
Developers using Deku can choose to also use JSX if they want to. This is especially helpful for people who are moving from React to Deku.
See More
Hide
See All
Get it
here
Recommend
2
--
Webix
My Rec
ommendation
for
Webix
My Recommendation for
Webix
All
8
Pros
8
Top
Pro
•••
Extremely simple to implement.
To get started is extremely simple. It has a low learning curve.
See More
Top
Pro
•••
Seems to be quite stable
Even the most complicated GUIs are bug-free most of the time.
See More
Top
Pro
•••
A lot of widgets
Webix is one of the most extensive UI component libraries, second only to Sencha ExtJS. Not only considering the number of widgets, but also the API methods for manipulating these widgets.
See More
Top
Pro
•••
Great support from the webix team
The company behind webix is really quick in answering any questions you have on their forum or via email.
See More
Top
Pro
•••
Webix Jet
The webix Jet library adds all the required features for SPA development (routing, template loading, ...)
See More
Top
Pro
•••
Awesome responsive material skins
Great design and icons pack.
See More
Top
Pro
•••
Mature project
Regular updates and releases.
See More
Top
Pro
•••
Views can be constructed using JavaScript without HTML
The most common way of working with webix is to create a JSON configuration of your view in JavaScript. When you use TypeScript, you get complete typechecking and intellisense in your IDE.
See More
Hide
See All
$0-$469
Recommend
3
--
DHTMLX Suite
My Rec
ommendation
for
DHTMLX Suite
My Recommendation for
DHTMLX Suite
All
5
Pros
5
Top
Pro
•••
Clear documentation and live code samples
See More
Top
Pro
•••
Extensive and easy-to-use API
See More
Top
Pro
•••
Cross-browser compatibility
See More
Top
Pro
•••
Dynamic loading
See More
Top
Pro
•••
Open-source standard edition
See More
Hide
See All
Get it
here
Recommend
2
--
slim.js
My Rec
ommendation
for
slim.js
My Recommendation for
slim.js
All
4
Experiences
1
Pros
2
Specs
Top
Pro
•••
Easy to learn and use
It leverages web components, uses the platform, and has reduced weight.
See More
Avichay Eyal's Experience
Very lightweight, fast and productive.
See More
Specs
GZipped size:
5KB
Platforms:
All
License:
MIT
Price:
Free
See All Specs
Top
Pro
•••
Compatible with all frameworks
See More
Hide
See All
Get it
here
Recommend
2
--
Marko Widgets
My Rec
ommendation
for
Marko Widgets
My Recommendation for
Marko Widgets
All
16
Pros
14
Cons
1
Specs
Top
Pro
•••
Stateful UI components
Marko Widgets supports stateful UI components. Marko Widgets will automatically rerender a UI component if its internal state changes. A UI component's state is stored in the this.state property that is a vanilla JavaScript object. All changes to the state should go through the this.setState(name, value) method (or this.replaceState(newState))
See More
Top
Con
•••
Not very popular
Marko Widgets doesn't seem to be very popular yet. With only ~ 400 stars on GitHub. This may be a problem for beginners because there are not many learning resources outside the official documentation.
See More
Specs
GZipped size:
39.1 kB
Top
Pro
•••
Simple JavaScript API for rendering a UI component
The following code illustrates how the render(input) method exported by a UI component's JavaScript module can be used to render a UI component and insert the resulting HTML into the DOM: require('./app-hello') .render({ name: 'John' }) .appendTo(document.body)
See More
Top
Pro
•••
Efficient event delegation
Marko Widgets supports efficient event delegation to avoid attaching DOM event listeners to each DOM node. Instead, Marko Widgets attaches event listeners on the document.body event for events that bubble. Events captured at the root are efficiently delegated out to widgets.
See More
Top
Pro
•••
DOM diffing/patching
Marko Widgets updates the DOM using a DOM diffing/patching algorithm to minimize the number of changes to the DOM when rerendering a UI component due to state changes. The DOM diffing/patching is handled by the independent morphdom library.
See More
Top
Pro
•••
Very fast on the server
Using Marko and Marko Widgets to render UI components on the server was shown to be 10x faster than React. A benchmark application was built using both Marko+Marko Widgets and React and the results of rendering a page of 100 search results on the server was measured and compared. Both the Marko Widgets code and the React code used a very similar UI components-based appraoch.
See More
Top
Pro
•••
UI components can be embedded in a Marko template using a custom tag.
The following code illustrates how a UI component can be embedded in a Marko template: <div> <app-hello name="Frank"/> </div>
See More
Top
Pro
•••
Batched updates
Updates to the DOM are deferred until all state changes have completed for the current tick. That is, changing a widget's state will not cause the UI component's DOM to immediately be updated.
See More
Top
Pro
•••
The real DOM is the source of truth
Marko Widgets does not rely on a virtual DOM abstraction. Instead, the real DOM is always the source of truth. When updating the DOM, the newly rendered DOM is compared with the real DOM.
See More
Top
Pro
•••
Very fast in the browser
Marko Widgets utilizes the morphdom module for updating the DOM and that module was shown to be very competitive with React and virtual-dom.
See More
Top
Pro
•••
Efficient binding of behavior for UI components rendered on the server.
When utilizing server-side rendering of a UI, Marko Widgets does not require that the UI be rerendered again in the browser just to bind behavior. Instead, extra information is passed down from the server to the client to allow Marko Widgets to efficiently bind widgets to UI components rendered on the server.
See More
Top
Pro
•••
Declarative eventing binding
Marko Widgets offers a simple mechanism for declaratively binding DOM event and custom event listeners to widget handler methods. For example: <button type="button" w-onClick="handleClick"> Click Me </button> And then in the JavaScript: module.exports = require('marko-widgets').defineComponent({ // ... handleClick: function(event, el) { this.doSomething(); } });
See More
Top
Pro
•••
Easily reference nested DOM elements and nested widgets
Marko Widgets supports the concept of "scoped" IDs. With scoped IDs, a nested DOM element or nested widget can be given an ID that is unique within the scope of the containing widget. At runtime the actual ID will be the scoped ID prefixed with the ID of the parent widget. A reference nested widget can be obtained using the this.getWidget(scopedId) method and a reference to a nested DOM element can be obtained using the this.getEl(scopedId) method. For example: <div class="my-app" w-bind> <button type="button" w-onClick="handleButtonClick"> Click Me </button> <alert-overlay visible="false" w-id="alert"> This is a test alert. </alert-overlay> <div w-id="clickMessage" style="display: none;"> You clicked the button! </div> </div> And then in the JavaScript code: module.exports = require('marko-widgets').defineComponent({ // ... handleButtonClick: function(event, el) { var alertWidget = this.getWidget('alert'); // Call the `show()` function implemented by the alert widget: alertWidget.show(); var clickMessageEl = this.getEl('clickMessage'); clickMessageEl.style.display = 'block'; } });
See More
Top
Pro
•••
Lightweight (~10 KB gzipped)
The runtime for Marko Widgets is extremely small. The runtime is very small and this makes Marko Widgets much simpler and easier to understand and debug. Marko Widgets offloads much of the work and complexity to compile time code so that the work required at runtime is minimal.
See More
Top
Pro
•••
Marko templating engine for the view
Marko is a fast and lightweight, general purpose HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering and custom tags. Marko is used for rendering UI components and Marko Widgets is used to bind client-side behavior to rendered UI components. Marko can be used independently of Marko Widgets and this makes it suitable in all situations where HTML rendering is needed.
See More
Hide
See All
Get it
here
Recommend
3
2
--
jsblocks
My Rec
ommendation
for
jsblocks
My Recommendation for
jsblocks
Hide
Get it
here
Recommend
Don't see your favorite option? Add it.
Built By the Slant team
Find the best product instantly.
4.7 star rating
Add to Chrome
Add to Edge
Add to Firefox
Add to Opera
Add to Brave
Add to Safari
Try it now - it's free
One sec!
Are you sure that you want to abandon your hard work?
Delete Work
Continue working
{}
undefined
url next
price drop