Skip to content

Instantly share code, notes, and snippets.

@femiabimbola
Last active May 22, 2023 14:06
Show Gist options
  • Save femiabimbola/7c02fdabef91a817d833a54f38a76110 to your computer and use it in GitHub Desktop.
Save femiabimbola/7c02fdabef91a817d833a54f38a76110 to your computer and use it in GitHub Desktop.
Building from Figma

Installing from Vite

npm create vite@latest

If you get the error vite is not ... do npm install

Installing Tailwind CSS

npm install -D tailwindcss postcss autoprefixer

npx tailwindcss init -p

Go to the tailwind.config.cjs, replace it with the code below

Module.exports = {
  content: ["./index.html", "./src/**/*.{js,jsx}"],
  theme: {
    extend: {
      colors: {
        primary: "#00040f",
        secondary: "#00f6ff",
        dimWhite: "rgba(255, 255, 255, 0.7)",
        dimBlue: "rgba(9, 151, 124, 0.1)",
      },
      fontFamily: {
        poppins: ["Poppins", "sans-serif"],
      },
    },
    screens: {
      xs: "480px",
      ss: "620px",
      sm: "768px",
      md: "1060px",
      lg: "1200px",
      xl: "1700px",
    },
  },
  plugins: [],
};

Adding tailwind directive to index.css

Go to the ./src/index.css and add the following directive at the top code
And any other code

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");

@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  --black-gradient: linear-gradient(
    144.39deg,
    #ffffff -278.56%,
    #6d6d6d -78.47%,
    #11101d 91.61%
  );
  --card-shadow: 0px 20px 100px -10px rgba(66, 71, 91, 0.1);
}

* {
  scroll-behavior: smooth;
}

.text-gradient {
  background: radial-gradient(
    64.18% 64.18% at 71.16% 35.69%,
    #def9fa 0.89%,
    #bef3f5 17.23%,
    #9dedf0 42.04%,
    #7de7eb 55.12%,
    #5ce1e6 71.54%,
    #33bbcf 100%
  );

You may delete everything in the App.jsx to start your program

The create a blank component i the App.js. You may delete the App.css and the asset folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment