DEV Community

Iain Freestone
Iain Freestone

Posted on • Originally published at iainfreestone.com

πŸš€10 Trending projects on GitHub for web developers - 12th March 2021

Trending Projects is available as a weekly newsletter please sign up at www.iainfreestone.com to ensure you never miss an issue.

1. Sweet Alert

A beautiful replacement for JavaScript's "alert"

GitHub logo t4t5 / sweetalert

A beautiful replacement for JavaScript's "alert"

SweetAlert

A beautiful replacement for JavaScript's "alert"

npm version Build status

A success modal

Installation

$ npm install --save sweetalert
Enter fullscreen mode Exit fullscreen mode

Usage

import swal from 'sweetalert';

swal("Hello world!");
Enter fullscreen mode Exit fullscreen mode

Upgrading from 1.X

Many improvements and breaking changes have been introduced in the 2.0 release. Make sure you read the upgrade guide to avoid nasty surprises!

Guides

Documentation

Examples

An error message:

swal("Oops!", "Something went wrong!", "error");
Enter fullscreen mode Exit fullscreen mode

A warning message, with a function attached to the confirm message:

  • Using promises:
swal({
  title: "Are you sure?",
  text: "Are you sure that you want to leave this page?",
  icon: "warning",
  dangerMode: true,
})
.then(willDelete => {
  if (willDelete) {
    swal("Deleted!", "Your imaginary file has been deleted!", "success")
…
Enter fullscreen mode Exit fullscreen mode

2. Anime.js

Anime.js is a lightweight JavaScript animation library with a simple, yet powerful API. It works with CSS properties, SVG, DOM attributes and JavaScript Objects.

GitHub logo juliangarnier / anime

JavaScript animation engine

Important

πŸŽ‰ Anime.js V4 is now available in early access πŸŽ‰

After years in the making, Anime.js V4 is finally available in early access for my GitHub Sponsors!


anime.js

JavaScript animation engine | animejs.com

NPM Downloads jsDelivr hits (npm) GitHub Sponsors

Anime.js (/ˈæn.Ι™.meΙͺ/) is a lightweight JavaScript animation library with a simple, yet powerful API.
It works with CSS properties, SVG, DOM attributes and JavaScript Objects.

Getting startedΒ |Β DocumentationΒ |Β Demos and examplesΒ |Β Browser support

Powered by

Getting started

Download

Via npm

$ npm install animejs --save
Enter fullscreen mode Exit fullscreen mode

or manual download.

Usage

ES6 modules

import anime from 'animejs/lib/anime.es.js';
Enter fullscreen mode Exit fullscreen mode

CommonJS

const anime = require('animejs');
Enter fullscreen mode Exit fullscreen mode

File include

Link anime.min.js in your HTML :

<script src="anime.min.js"></script>
Enter fullscreen mode Exit fullscreen mode

Hello world

anime({
  targets: 'div',
  translateX: 250,
  rotate: '1turn',
  backgroundColor: '#FFF',
  duration
…
Enter fullscreen mode Exit fullscreen mode

3. cote

A Node.js library for building zero-configuration microservices. cote lets you write zero-configuration microservices in Node.js without nginx, haproxy, redis, rabbitmq or anything else. It is batteries β€” and chargers! β€” included.

GitHub logo dashersw / cote

A Node.js library for building zero-configuration microservices.

cote

cote β€” A Node.js library for building zero-configuration microservices

npm version Build Status Coverage Status dependencies Status GitHub license FOSSA Status

cote lets you write zero-configuration microservices in Node.js without nginx haproxy, redis, rabbitmq or anything else. It is batteries β€” and chargers! β€” included.

Join us on cote Slack for anything related to cote.

Features

  • Zero dependency: Microservices with only JavaScript and Node.js
  • Zero-configuration: No IP addresses, no ports, no routing to configure
  • Decentralized: No fixed parts, no "manager" nodes, no single point of failure
  • Auto-discovery: Services discover each other without a central bookkeeper
  • Fault-tolerant: Don't lose any requests when a service is down
  • Scalable: Horizontally scale to any number of machines
  • Performant: Process thousands of messages per second
  • Humanized API: Extremely simple to get started with a reasonable API!

Develop your first microservices in under two minutes:

in time-service.js...

const cote = require('cote');
const timeService = new cote.Responder({ name: 'Time Service'
…
Enter fullscreen mode Exit fullscreen mode

4. Chroma.js

Chroma.js is a small-ish zero-dependency JavaScript library (13.5kB) for all kinds of color conversions and color scales.

GitHub logo gka / chroma.js

JavaScript library for all kinds of color manipulations

Chroma.js

Chroma.js is a tiny small-ish zero-dependency JavaScript library for all kinds of color conversions and color scales.

Build Status

Usage

Install from npm

npm install chroma-js

Import package into project

import chroma from "chroma-js";
Enter fullscreen mode Exit fullscreen mode

Initiate and manipulate colors:

chroma('#D4F880').darken().hex();  // #a1c550
Enter fullscreen mode Exit fullscreen mode

Working with color scales is easy, too:

scale = chroma.scale(['white', 'red']);
scale(0.5).hex(); // #FF7F7F
Enter fullscreen mode Exit fullscreen mode

Lab/Lch interpolation looks better than RGB

chroma.scale(['white', 'red']).mode('lab');
Enter fullscreen mode Exit fullscreen mode

Custom domains! Quantiles! Color Brewer!!

chroma.scale('RdYlBu').domain(myValues, 7, 'quantiles');
Enter fullscreen mode Exit fullscreen mode

And why not use logarithmic color scales once in your life?

chroma.scale(['lightyellow', 'navy']).domain
…
Enter fullscreen mode Exit fullscreen mode

5. Plotly.js

Plotly.js is a standalone Javascript data visualization library. Can be used to produce dozens of chart types and visualizations, including statistical charts, 3D graphs, scientific charts, SVG and tile maps, financial charts and more.

GitHub logo plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash

npm version circle ci MIT License

Plotly.js is a standalone Javascript data visualization library, and it also powers the Python and R modules named plotly in those respective ecosystems (referred to as Plotly.py and Plotly.R).

Plotly.js can be used to produce dozens of chart types and visualizations, including statistical charts, 3D graphs, scientific charts, SVG and tile maps, financial charts and more.

Contact us for Plotly.js consulting, dashboard development, application integration, and feature additions.

Table of contents


Load as a node module

Install a ready-to-use distributed bundle

npm i --save plotly.js-dist-min
Enter fullscreen mode Exit fullscreen mode

and use import or require in node.js

// ES6 module
import Plotly from 'plotly.js-dist-min'

// CommonJS
var Plotly = require('plotly.js-dist-min')
Enter fullscreen mode Exit fullscreen mode

You may also consider using plotly.js-dist if you prefer using an unminified…


6. Complete Intro to React

The Complete Intro to React, the fifth version

GitHub logo btholt / complete-intro-to-react-v5

The Complete Intro to React, the fifth version

To find the latest version of the React courses, head to the React Learning Path on Frontend Masters.

Before starting the course, please have VSCode or another code editor installed.

The master branch and commits within are all covered in Introduction to React v5. The other branches, excluding the gh-pages-src and gh-pages branches (these create the course website), are all covered in Intermediate React as modular segments that can be taken individually, or out of order.

Brian is using a font called Dankmono (not necessary to install -- just for those curious), but FiraCode is another great option. This course was written for and recorded by Frontend Masters. The code here is licensed under the Apache 2.0 license and the course notes are licensed under the Creative Commons…


7. ReactContentLoader

SVG-Powered component to easily create placeholder loadings (like Facebook's cards loading).

GitHub logo danilowoz / react-content-loader

βšͺ SVG-Powered component to easily create skeleton loadings.

react-content-loader

Example's react-content-loader

SVG-PoweredΒ componentΒ toΒ easilyΒ createΒ placeholderΒ loadingsΒ (likeΒ Facebook'sΒ cardsΒ loading).

Features

  • βš™οΈΒ Customizable:Β FeelΒ freeΒ toΒ changeΒ theΒ colors,Β speed,Β sizes,Β andΒ evenΒ RTL;
  • πŸ‘ŒΒ PlugΒ andΒ play:Β withΒ manyΒ presetsΒ toΒ use,Β seeΒ theΒ examples;
  • ✏️ DIY:Β useΒ theΒ create-content-loaderΒ toΒ createΒ yourΒ ownΒ customΒ loadersΒ easily;
  • πŸ“± React Native support: same API, as same powerful features;
  • βš›οΈ Really lightweight: less than 2kB and 0 dependencies for web version;

Index

GettingΒ Started

npm i react-content-loader --save
Enter fullscreen mode Exit fullscreen mode
yarn add react-content-loader
Enter fullscreen mode Exit fullscreen mode

For React Native

npm i react-content-loader react-native-svg --save
Enter fullscreen mode Exit fullscreen mode
yarn add react-content-loader react-native-svg
Enter fullscreen mode Exit fullscreen mode

CDNΒ fromΒ JSDELIVR

Usage

ThereΒ areΒ twoΒ waysΒ toΒ useΒ it:

1.Β Presets,Β seeΒ theΒ examples:

import ContentLoader, { Facebook } from 'react-content-loader'
const MyLoader = () => <ContentLoader />
const MyFacebookLoader = () => <Facebook /
…
Enter fullscreen mode Exit fullscreen mode

8. goober

goober, a less than 1KB css-in-js alternative with a familiar API

GitHub logo cristianbote / goober

πŸ₯œ goober, a less than 1KB πŸŽ‰ css-in-js alternative with a familiar API

goober

πŸ₯œ goober, a less than 1KB css-in-js solution.

Backers on Open Collective Sponsors on Open Collective

version status gzip size downloads coverage Slack

πŸͺ’ The Great Shave Off Challenge

Can you shave off bytes from goober? Do it and you're gonna get paid! More info here

Motivation

I've always wondered if you could get a working solution for css-in-js with a smaller footprint. While I was working on a side project I wanted to use styled-components, or more accurately the styled pattern. Looking at the JavaScript bundle sizes, I quickly realized that I would have to include ~12kB(styled-components) or ~11kB(emotion) just so I can use the styled paradigm. So, I embarked on a mission to create a smaller alternative for these well established APIs.

Why the peanuts emoji?

It's a pun on the tagline.

css-in-js at the cost of peanuts! πŸ₯œgoober

Talks and Podcasts


9. Tagify

Transforms an input field or a textarea into a Tags component, in an easy, customizable way, with great performance and small code footprint, exploded with features.



10. Polacode

Polaroid for your code

GitHub logo octref / polacode

πŸ“Έ Polaroid for your code

Polacode β€” Polaroid for your code πŸ“Έ

usage

Why?

You have spent countless hours finding the perfect JavaScript grammar, matching it with a sleek-looking VS Code theme, trying out all the best programming fonts.

You take three days porting over your theme before starting to use VS Code.
You shell out $200 for italic cursive html attributes.

The code has to look right.

Tips

  • Resize the snippet / container by dragging the lowerright corner
  • Use polacode.target, polacode.shadow, polacode.transparentBackground and polacode.backgroundColor to control image appearance

Demo

Nord + Input Mono

demo1

Monokai Pro + Operator Mono

demo2

Material Theme Palenight + Fira Code

demo3

Credit

Thanks to @tsayen for making dom-to-image, which Polacode is using for generating the images.

Thanks to Dawn Labs for making Carbon that inspired Polacode.

Many color are taken from the elegant Nord theme by @arcticicestudio.

Download button animation is made with Vivus…


Trending Projects is available as a weekly newsletter please sign up at www.iainfreestone.com to ensure you never miss an issue.

If you enjoyed this article you can follow me on Twitter where I regularly post bite size tips relating to HTML, CSS and JavaScript.

Top comments (12)

Collapse
 
stremovsky profile image
Yuli

Hi

You can add my open-source tool to the list.

Databunker is a Swiss army knife tool for storing personal records or PII:
databunker.org/

Node.js example:
github.com/securitybunker/databunk...

Collapse
 
souviktests profile image
Souvik Paul

Thanks. Awesome post ;)

Collapse
 
ra1nbow1 profile image
Matvey Romanov

So useful, thanks

Collapse
 
rafaacioly profile image
Rafael Acioly

everything is about JS and i'm not even surprised anymore :)

awesome post!

Collapse
 
andrewbaisden profile image
Andrew Baisden

Anime.js 😍 Yes I am an Anime geek 😁

Collapse
 
seyavan profile image
Seyavan Y.

Thank you, Very useful

Collapse
 
machineno15 profile image
Tanvir Shaikh

Sweetalert I'm using from years now,
But why it's trending ? any new update ?

Collapse
 
mitya profile image
Dima
Collapse
 
rajmohanpdy profile image
rajmohan s

Thanks so much. useful content. Bookmarked.

Collapse
 
rayvikram profile image
rayvikram

Thanks. I always bookmark your content πŸ˜„.

Collapse
 
iainfreestone profile image
Iain Freestone

Thank you, I enjoy compiling it each week. So many great resources out there

Collapse
 
georgefareed profile image
George Awad

Thxxx