Step 1) Add HTML: Example <div class=”loader”></div> Step 2) Add CSS: Example .loader { border: 16px solid #f3f3f3; /* Light grey */ border-top: 16px solid #3498db; /* Blue */ border-radius: 50%; width: 120px; height: 120px; animation: spin 2s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } Example Explained The border property specifies the border size and the border color of… Continue reading How to create custom loader using css
Author: Sangamesh
Adding tooltip in the to the icon/to text for showing name when hover on it on next.js
Create tooltips with CSS. A tooltip is often used to specify extra information about something when the user moves the mouse pointer over an element: Basic Tooltip Create a tooltip that appears when the user moves the mouse over an element: Example <style> /* Tooltip container */ .tooltip { position: relative; display: inline-block; border-bottom: 1px dotted black; /*… Continue reading Adding tooltip in the to the icon/to text for showing name when hover on it on next.js
How to add Custom 404 page not found page in next.js
In this article, we cover how to create a custom 404 page-not-found handling page when entering a wrong URL/page on Next.js In NEXT.JS, It provides a custom 404 page-not-found handling page, Create a not-found.js file Inside the app root pages directory of your Next.js project, create a file named not-found.js. This file will handle all… Continue reading How to add Custom 404 page not found page in next.js
How to add custom error handling page in the nex.js
In this article, we cover how to create an error-handling page when any error occurs on Next.js In NEXT.JS, It provides a custom error-handling page, Createerror.js: Inside the pages directory of your Next.js project, create a file namederror.js. This file will handle all errors that occur in your application. The name must be the same… Continue reading How to add custom error handling page in the nex.js
Different between Single Page Application and Multi page Application on Web application
Differences between Single Page Applications and Multi-page Applications on Web application Single Page Application (SPA): In a SPA, the entire application runs within a single web page. The initial HTML page is loaded from the server, and subsequent interactions are handled dynamically through JavaScript. SPAs use AJAX (asynchronous JavaScript and XML) to retrieve data from… Continue reading Different between Single Page Application and Multi page Application on Web application
How to create custom check-box in next.js
In this article, we will cover how to create a custom checkbox next.js < div className=”flex items-center z-0″> <label className=”relative flex cursor-pointer items-center rounded-full p-3″ htmlFor=”checkbox-00″ data-ripple-dark=”true”> <input type=”checkbox” … Continue reading How to create custom check-box in next.js
How to create a multi-select functionality in the next.js
In this article, We will cover How to Multi-select/Select all Functionality on Next.JS first, create a new state for the Selected material const [selectedMaterials, setSelectedMaterials] = useState(new Set()); Then create a function for Multi-select/Select all const handleSelectAll = (event) => { const { checked } = event.target; const newSelectedMaterials = new… Continue reading How to create a multi-select functionality in the next.js
How to resolve the URL issue when deployed next js app to firebase
In this article, we will cover How to resolve the URL issue when deploying the next.js app to Firebase Solution: After deploying the Next.js app to the firebase.json add the ” “cleanUrls”: true,” Like shown Below { “hosting”: { “public”: “out”, “cleanUrls”: true, “ignore”: [ “firebase.json”,… Continue reading How to resolve the URL issue when deployed next js app to firebase
How to set and /or redirect a path on next js
Setting a Path To set a path in Next.js, you typically define routes using the Next.js router. You can define routes using the Link component or by programmatically navigating using the router. Using the Link Component The Link component is used to navigate between pages in the Next.js application. Here’s how you can use it:… Continue reading How to set and /or redirect a path on next js
How to set and get cookies on next js
Installation First, you need to install the js-cookie library in your Next.js project: npm install js-cookie Usage Once installed, you can use js-cookie in your Next.js components or pages. Set Cookies To set a cookie, you can use the set method provided by js-cookie: import Cookies from ‘js-cookie’; // Set a cookie Cookies.set(‘cookieName’, ‘cookieValue’, {… Continue reading How to set and get cookies on next js