Next.Js

Template

We have a Next.Js template pre configured with all the packages that need to be installed to use Pixel UI Components and already includes some Components.

Paste below command in your preferred CLI to clone the template from Github.

$ npx create-next-app -e https://github.com/Navin-Jethwani-76/pixelui-nextjs-template

Installation (App Router)

  • Create A New Next.Js Project

    $ npx create-next-app@latest

    Choose Yes when asked if you want to use App Router

  • Install Required Packages

    $ npm install @nextui-org/react framer-motion tailwindcss-animated react-icons
  • Tailwind CSS Setup

  • Setup Provider

  • Add Provider to Root

  • Install next-themes to switch between light and dark themes (Optional)

    $ npm install next-themes

    Add next-themes provider

Installation (Pages Router)

  • Create A New Next.Js Project

    $ npx create-next-app@latest
  • On installation, you'll see the following prompts:

    $ What is your project named? my-app
    $ Would you like to use TypeScript? No / Yes
    $ Would you like to use ESLint? No / Yes
    $ Would you like to use Tailwind CSS? No / Yes
    $ Would you like to use `src/` directory? No / Yes
    $ Would you like to use App Router? No (Choose `No` here)
    $ Would you like to customize the default import alias (@/*)? No / Yes
    $ What import alias would you like configured? @/*
  • Install Required Packages

    $ npm install @nextui-org/react framer-motion tailwindcss-animated react-icons
  • Tailwind CSS Setup

  • Setup Provider

  • Install next-themes to switch between light and dark themes (Optional)

    $ npm install next-themes

    Add next-themes provider