This starter shows how to use a Next.js v10.0.6 app with TypeScript, Tailwind CSS, and a switchable dark mode. Uses the following:
- TypeScript v4.1.3 for build-time type safety
- ESLint v7.19.0 for JavaScript & TypeScript linting
- Prettier v2.2.1 for code formatting
- Husky v4.3.8 for code linting and formatting in git hooks
- Lint Staged v10.5.4 for linting staged files in git hooks
- React v17.0.1
- Tailwind CSS v2.0.2 for CSS utility
- Stylelint v13.9.0 for CSS linting
Execute create-next-app
with npm or Yarn to bootstrap the starter:
npx create-next-app nextjs-with-dark-mode --example "https://github.com/adamsome/nextjs-with-dark-mode"
# or
yarn create-next-app nextjs-with-dark-mode --example "https://github.com/adamsome/nextjs-with-dark-mode"
Note: Requires Node v12+ to run.