Create Beautiful Gradient Transitions with Granim.js

create-beautiful-gradient-transitions-with-granim-js

In web design, some features are made only for the sake of beauty while others are made for functional purpose. Gradient transitions are one of designs that made solely for show but they are quite popular and entertaining.

Now you can build gradient transitions with Granim.js. The result will look smooth and mesh nicely in any website. In fact, Granim may be the only JS library that managing gradient transitions and offer the perfect solution. Besides, it’s built on Vanilla JavaScript, so it can run alongside jQuery or any other JS library.

To get started with granim.js, you can drop the file into your page. You can also download a copy from GitHub or host one from a live CDN.

Here’s a basic code sample from the GitHub repo:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

<!– Create a canvas element –>

<canvas id=”granim-canvas”></canvas>

<!– Create a Granim instance –>

<script>

var granimInstance = new Granim({

element: ‘#granim-canvas’,

name: ‘granim’,

opacity: [1, 1],

states : {

“default-state”: {

gradients: [

[‘#834D9B’, ‘#D04ED6’],

[‘#1CD8D2’, ‘#93EDC7’]

]

}

}

});

</script>

It may look simple, but things can get more complicated than this. That’s why; you need to learn more on some examples. Then, find code snippets under each example to create gradient transitions for image backgrounds and even image masks.

The image masks can be used for a logo, for instance a PNG image, which gets hidden behind a gradient. Gradient will slowly transitions throughout the text which is as a result create a JS-animated logo.

Example

The example above takes a lot of JS/CSS code, so basically it’s not a simple implementation. But, you’ll find it is easier to be setup and customized after several practices. In fact, it’s the absolute best solution for any project as it is the only true gradient transition library online.

If you have any issues, you can check the issues tab, since the library is still updated semi-frequently. It’s only a pretty small library where there are no many things that need updating. This is also the strong reason why Granim.js can be a reliable solution for any site small or large.

Top JavaScript Frameworks in 2017

top-javascript-frameworks

 

 

 

 

 

The popularity of JavaScript in so many vibrant ecosystems of technologies, frameworks, and libraries is undoubtable. But, JavaScript comes in many features and many web developers are wondering where should you invest your time to get the most benefit? Which tech stacks are companies hiring for right now? Which ones have the most growth potential? Below are some JavaScript Frameworks in 2017 that is predicted will be popular. Check this out!

React

React is one of Facebook’s products; it is a JavaScript library for building user interfaces. It’s based on the idea of uni-directional data flow, meaning that for each update cycle:

  1. React takes inputs to components as props and conditionally renders DOM updates if data has changed for specific parts of the DOM. Data updates during this phase can’t retrigger the render until the next drawing phase.
  2. Event handling phase – after the DOM has rendered, React listens for and events, delegating events to a single event listener at the root of its DOM tree. You can listen to those events and update data in response.
  3. Using any changes to the data, the process repeats at 1.

Redux

Redux offers transactional, deterministic state management for your apps. In Redux, we iterate over a stream of action objects to reduce to the current application state. Redux is mandatory learning, even if you never use Redux for a production project. From Redux, you can learn the value of using pure functions and new ways to think about reducers. Reducers are general-purpose functions for iterating over collections of data and extracting some value from them. It is so useful that you can find Array.prototype.reduce in JS specification.

Angular

Angular 2 is the first feature to the wildly popular Angular framework from Google. Because of its popularity, people will look cool for those who can do it, but it is better to learning React first.

There are two reasons why some people have a preference for React over Angular 2:

  1. It’s simpler,
  2. It’s extremely popular and used in lots of jobs

Whatever your choice is, whether it is React or Angular 2, we recommend you to learn it for at least 6 months-1 year before you can jump to the other program.

RxJS*

RxJS is populary known as a collection of reactive programming utilities for JavaScript. It is quite similar with Lodash for streams. Reactive programming has officially arrived on the JavaScript scene. The ECMAScript Observables proposal is a stage-1 draft, and RxJS 5+ is the canonical standard implementation.

However in RxJS, you will find that you can’t just import the whole thing all at once. So, you can use the patch imports to reduce the size of your rxjs dependencies. Instead of, combating bundle boat while importing things.

imgblog