Skip to content

Instantly share code, notes, and snippets.

View gopinav's full-sized avatar

Vishwas gopinav

View GitHub Profile
@gopinav
gopinav / LandingPage.tsx
Created January 29, 2024 10:58
Final component code with secondary navbar animations
import React, { useState } from "react";
import { useInView, InView } from "react-intersection-observer";
const sections = ["Issues", "Cycles", "Roadmaps", "Workflows"];
const menuWidths = {
Issues: {
open: "124px",
closed: "65px",
},
@gopinav
gopinav / LandingPage.tsx
Last active January 29, 2024 07:39
Initial markup for the React Intersection Observer example
import React from "react";
const sections = ["Issues", "Cycles", "Roadmaps", "Workflows"];
function LandingPage() {
return (
<div className="flex flex-col pb-12 bg-gray-950">
<header className="fixed top-0 left-0 right-0 h-12 flex justify-center items-center backdrop-blur-[30px] border-t-[rgba(255,255,255,0.10;border-right:0px)_solid_rgba(255,255,255,0.10;] z-30 w-[100%] px-60 border-l-[0px)] border-l-[rgba(255,255,255,0.10;] border-t-[0px)] border-b-[rgba(255,255,255,0.10);] border-solid border-b max-md:max-w-full max-md:px-5">
<div className="flex items-center gap-0 max-md:max-w-full max-md:flex-wrap">
<span className="flex items-start justify-between gap-5 my-auto max-md:max-w-full max-md:flex-wrap">
@gopinav
gopinav / Hero.tsx
Created January 22, 2024 09:46
Staggered animation initial markup
import React from "react";
export function Hero() {
return (
<div className="bg-gray-950 flex flex-col pb-12">
<header className="justify-center items-center border-t-[rgba(255,255,255,0.10;border-right:0px)_solid_rgba(255,255,255,0.10;] z-[1;] w-[100%;] px-60 py-8 border-l-[0px)] border-l-[rgba(255,255,255,0.10;] border-t-[0px)] border-b-[rgba(255,255,255,0.10);] border-solid border-b max-md:max-w-full max-md:px-5">
<div className="flex items-center gap-0 max-md:max-w-full max-md:flex-wrap">
<span className="items-start flex justify-between gap-5 my-auto max-md:max-w-full max-md:flex-wrap">
<img
loading="lazy"