Found 217 Articles for Javascript Library

How to Add a Third Party Library in Deno.js?

AmitDiwan
Updated on 13-Feb-2023 17:41:03

207 Views

To add a third-party library in Deno, we need to import the library from its URL. We can use the "import" statement followed by the URL of the library. It is also possible to use a local file path instead of a URL. The library can then be used in our code by referencing its exported functions or variables. Let us first understand what is Deno.js − What is Deno.js? Deno is a new JavaScript/TypeScript runtime built with V8 JavaScript engine. It is built on top of Rust programming language and uses the Tokio library for asynchronous I/O. Unlike ... Read More

How to add a theme to your webpage using Bootswatch in a ReactJS project?

AmitDiwan
Updated on 13-Feb-2023 17:35:07

936 Views

We first need to install the react-bootstrap and bootswatch packages using npm. Next, we import the desired theme from bootswatch and apply it to our React components using the 'import' and 'className' properties. Lastly, we can easily switch between themes by simply changing the imported theme. Let us first understand what Bootswatch is. What is Bootswatch? Bootswatch is a collection of free and open-source themes for Bootstrap, a popular front-end development framework. The themes are available in various styles, such as material design, flat, and dark mode. Bootswatch themes are easy to install and customize, allowing developers to quickly ... Read More

How to add Tag Input in ReactJS?

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

3K+ 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 a stylesheet in Next.js?

AmitDiwan
Updated on 13-Feb-2023 17:21:30

9K+ Views

We can add a stylesheet in Next.js by creating a CSS file in the "pages" directory and importing it in the desired component. We can also use CSS-in-JS libraries like styled-jsx for styling in Next.js. It is important to note that the styles will only be scoped to the component they are imported in and will not affect the global styles. 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 ... Read More

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

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

524 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 a Star Rating Component in NextJS?

AmitDiwan
Updated on 13-Feb-2023 17:15:19

2K+ Views

We can add a star rating feature in NextJS by using a library such as react-star-rating. This library allows us to easily display a star rating system and allows for customization of the number of stars and the ability to handle user interactions.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 Link component that links other components together and has a prefetch property that allows for ... 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

210 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

14K+ 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

117 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

Previous 1 ... 6 7 8 9 10 ... 22 Next
Advertisements