Posts

Showing posts from July, 2024

GSAP notes

 <------------------------------------- GSAP IMPS -----------------------------------------> # Randoms 1. Remember to use the useEffect and useRef(to take the reference of that particular block link div,etc) hook while using GSAP library.    Example:-         const containerRef = useRef(null);         useEffect(() => {             const tl = gsap.timeline();               tl.to(containerRef.current, {               x: 800,               duration: 1,               delay: 2,               backgroundColor: "green",               rotate: 270,               borderRadius: "50%",               // both properties are requi...

ReactJs Notes

 -------------------------------------- TAILWIND IN REACTJS ------------------------------------------------- Link paste in <head> tag:-- <script src="https://cdn.tailwindcss.com"></script> Manual Intsallation for in reactjs app :-- Use commands 1. npm create vite 2. npm i 3. npm install tailwindcss @tailwindcss/vite Configure the Vite plugin Add the @tailwindcss/vite plugin to your Vite configuration. import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' // https://vite.dev/config/ export default defineConfig({      plugins: [           react(),           tailwindcss(),      ], }) Import Tailwind CSS Add an @import to your CSS file that imports Tailwind CSS. Add the @tailwind directives for each of Tailwind’s layers to your main CSS file (index.css). @import "tailwindcss" use command npm run de...