tailwind-csstypographytailwind-css-4nextjs-15

How to configure tailwindcss/typography in Nextjs 15+


I am using Next.js 15. I want to render markdown and use prose from TailwindCSS Typography plugin. I have installed the plugin but it tells me to configure tailwind.config.ts which is missing in the Next.js 15. How to solve this problem?


Solution

  • In tailwind 4 you only need to do the following. Install the plugin

    npm install -D @tailwindcss/typography
    

    enable it in global.css (assuming you are using default next configuration withapp router):

    @import "tailwindcss";
    @plugin '@tailwindcss/typography';
    

    Github issue dicussing this