Ultimate Front-end Template made using NextJs, TailwindCSS, and Typescript

Ultimate Front-end Template

Most elements are taken from my website.

Use as a CodeSandbox template

Ingredients ✨:

  • NextJS ?
  • TailwindCSS ?
  • Typescript ?
  • Dark Mode Support ?
  • ESLint + Prettier Config ?
  • Husky ?
  • Self-Hosted Inter Font ␊

Under the components folder, use Container for each of your pages – as it provides a reusable starting point for every page.

<Container>...pageElements</Container>

Getting started

  1. With ‘use as template’ repository

  2. Clone the project

# http
git clone https://github.com/cristicretu/ts-next-tailwind-template.git

# ssh
git clone git@github.com:cristicretu/ts-next-tailwind-template.git
  1. With create-next-app
npx create-next-app -e https://github.com/cristicretu/ts-next-tailwind-template project-name

Install the required packages and run the template

cd project-name
yarn install

Included

Custom classNames function

Under /lib/classNames

Packages

  1. Next-themes: An abstraction for themes in your Next.js app.
  2. react-use: react-hooks

Custom globals.css

  1. custom underline
  2. vercel navbar
  3. removes firefox, edge and ie. bugs with overflows

Absolute Imports

import TextField from '../../../components/TextField.tsx'

changes to

import TextField from 'components/TextField.tsx'

SEO optimization found in Container.tsx

Folder structuring & organization

Under /components/ & /public/

Self Hosted Inter Font

Under /public/fonts/

404 Page

Favicons and more configs

Under /public/static/favicons/

GitHub

View Github