Found 8894 Articles for Front End Technology

How to add Tag Input in ReactJS?

AmitDiwan
Updated on 13-Feb-2023 17:29:14

4K+ Views

We can add a tag input in NextJS by creating a new component for the input field and using the onChange event to handle the inputted tags. We can also use the state to store the tags and display them as they are inputted. Finally, we can add a button or function to submit the final tag list. Let us first understand what is ReactJS and Tag Input. ReactJS React is a JavaScript library for building user interfaces. It makes it easy to create interactive UIs. Design simple views for each state in your application, and React will efficiently update ... Read More

How to add Summernote Editor to the webpage in Javascript?

AmitDiwan
Updated on 13-Feb-2023 17:25:44

3K+ Views

To add Summernote Editor in a webpage, we first need to include the Summernote CSS and JS files in the head of our HTML document. Next, we need to initialize the Summernote editor on a specific text area or div element by calling the Summernote function on it. Finally, we can customize the editor's options and functionality by passing options as an object to the Summernote function. Let us first understand what Summernote editor is. What is Summernote? Summernote is a JavaScript library that allows for the creation and editing of rich text within a web page. It is ... Read More

How to add a Stateful component without a constructor class in React?

AmitDiwan
Updated on 13-Feb-2023 17:18:10

540 Views

We can add a stateful component without using a constructor class by using the useState hook. This hook allows us to create and update state within our component without the need for a constructor. To use this hook, we simply call the useState function and pass in our initial state as an argument. There are primarily two ways of creating React Components − Using JS classes. Using functional components. Before react v16 there was no way of adding state to functional components. But since the inception of React Hooks we can write stateful functional components as well. A ... Read More

How to Add Spinner Loader in NextJS?

AmitDiwan
Updated on 13-Feb-2023 17:04:14

6K+ Views

We can use conditional rendering to only display the spinner when certain conditions are met, such as when data is being fetched from an API. Additionally, we can use CSS to style the spinner and make it match the overall design of our website. What is NextJS? Next.js is a JavaScript framework for building server-rendered React applications. It provides a set of features and tools that make it easy to build and deploy high-performance web applications, such as automatic code splitting, server-side rendering, and static site generation. Next.js also simplifies the setup process and provides a development environment that allows ... Read More

How to add shadow to a canvas circle using Fabric.js?

AmitDiwan
Updated on 13-Feb-2023 16:27:41

243 Views

We can add a shadow to a canvas circle using Fabric.js by creating a new circle object, then setting the "shadow" property of the object to an object containing the desired shadow properties such as color and offset. Fabric.js is an open-source JavaScript library that allows developers to create and manipulate HTML5 canvas elements with ease. It simplifies the process of creating, editing and animating canvas elements by providing a set of powerful and flexible APIs. With Fabric.js, developers can create complex canvas graphics, animations, and interactive elements without having to deal with the low-level canvas API. It also provides ... Read More

How to add Popup in NextJS?

AmitDiwan
Updated on 10-Feb-2023 17:39:38

15K+ Views

We can add a Popup in NextJS by using a library such as react-modal or reactjs-popup. This will allow us to create a modal component that can be easily integrated into our NextJS application. We can also use CSS to style the popup to match the design of our website. Let us first learn what Next.js is. Next.js is an open-source web development framework. The Next.js is React Based framework with server side rendering capability. Both speed and SEO are excellent. You can simply build and test sophisticated react-based applications using Next.js. Next.js is written in Typescripts. It offers a ... Read More

How to ungroup only selected grouped Polylines after grouping using FabricJS?

Rahul Gurung
Updated on 16-Feb-2023 16:33:19

130 Views

We can create a Polyline object by creating an instance of fabric.Polyline. A polyline object can be characterised by a set of connected straight-line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity, etc. For ungrouping grouped Polyline objects we can use the toActiveSelection() method. Syntax toActiveSelection(): fabric.ActiveSelection Example 1: Grouping All the Polylines using One Click Before seeing how to ungroup, let's see how we can group objects. In this example, we will have a button on clicking which all the Polylines will ... Read More

How to ungroup multiple Polylines after grouping using FabricJS?

Rahul Gurung
Updated on 16-Feb-2023 16:31:45

300 Views

We can create a Polyline object by creating an instance of fabric.Polyline. A polyline object can be characterised by a set of connected straight-line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity, etc. For ungrouping multiple Polyline objects we can use the toActiveSelection() method. Syntax toActiveSelection(): fabric.ActiveSelection Example 1: Grouping All the Polylines using One Click Before seeing how to ungroup, let's see how we can group objects. In this example, we will have a button on clicking which all the Polylines will ... Read More

How to serialize a Polyline object into JSON in FabricJS?

Rahul Gurung
Updated on 16-Feb-2023 16:31:00

204 Views

A polyline object can be characterised by a set of connected straight-line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity, etc. Serialization means converting the canvas into savable data which can be converted back into the canvas later. This data can be an object or JSON so that it can be stored on servers. We will use the toJSON() method to convert the canvas with Polyline object into JSON. Syntax toJSON(propertiesToInclude: Array): Object Parameters propertiesToInclude − This parameter accepts an Array ... Read More

How to randomly generate Polyline objects with a button click in FabricJS?

Rahul Gurung
Updated on 16-Feb-2023 16:30:01

174 Views

A polyline object can be characterised by a set of connected straight-line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity, etc. We will create a program where pressing a button will randomly generate a Polyline object and add it to our canvas for us. Syntax new fabric.Polyline(points: Array, options: Object) Parameters points − This parameter accepts an Array which denotes the array of points that make up the polyline object. options (optional) − This parameter is an Object which provides ... Read More

Advertisements