Site logo
Sep 10, 20225 mins read

Setting Up Web Project using Next.js, Tailwind and Storybook

Next.js and Tailwind are popular frameworks in modern web development. I’ve used them in some projects and really happy with the result. Storybook is one library to create component documentation which can be integrated to project written in many UI libraries. It provides many functionalities to enhance our documentation. Let’s try to combine these libraries to set up our next web project.

Setup Next.js

First of all, let’s initiate the project using Next.js:

Integrate Tailwind into Next.js

Tailwind provides a comprehensive guideline for many frameworks. Here’s to install Tailwind into Next.js.

Landing page using Tailwind
Landing page using Tailwind

Install Storybook

When our project grows and we have a lot of components, making sure there’s no duplication becomes harder if we don’t have proper component documentation. Storybook is a library to create component documentation. It can be integrated to project written in many UI libraries and provides useful functionalities.

Storybook using Tailwind and storybook-addon-next
Storybook using Tailwind and storybook-addon-next
README.md rendered in Storybook
README.md rendered in Storybook

Congrats! Your web project is ready. Let's build a beautiful web app by adding more components and stories. I also created a project starter based on this article which you can use to speed up the project set-up.

software-engineeringjavascript
Enable Tailwind Dark Mode in Next.j...
The Books I Read in 2020