Kickstart Your Next.js Project with TypeScript, Tailwind CSS, and Storybook in 2025!


Installation :
To create a new Next.js latest
app run this command, it will install Typescript , ESLint automatically.
npx create-next-app@latest
After finish install / create Next.js app, we have to install Tailwind CSS! To install run this command
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p
Now create tailwind.config.js file into Next.js app root folder and paste bellow code into the file.
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
// Or if using `src` directory:
"./src/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {},
},
plugins: [],
}
Now open the globals.css file and paste bellow code.
@tailwind base;
@tailwind components;
@tailwind utilities;
We finished Tailwind CSS setup👏! Let’s setup Story Book! To install Story Book run this command
npx storybook@latest init
And to run it
npm run storybook
OR
npm run storybook
OR
pnpm run storybook
It will run on 6006 port
http://localhost:6006
👏Hurrah! we finished the setup!
Check out my nextjs-tailwindcss-storybook-typescript quick start template on github.🤩 please start the repo to get new updates!
https://github.com/anikrauth/nextjs-tailwindcss-storybook-typescript
Subscribe to my newsletter
Read articles from Anik Routh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
