storybookjs / frontpage

🌐 The website for storybook.js.org
https://storybook.js.org
MIT License
212 stars 116 forks source link

[tailwindcss]: #698

Open PabloGracia opened 1 month ago

PabloGracia commented 1 month ago

Details

Recipe Page: tailwindcss Recipe Template: tailwindcss Browser: Arc Browser - Version 1.42.0

What is wrong

The instructions state to import the tailwind.css file into your .storybook/preview.js file. The example it gives is this one:

image

However, the src directory or the tailwind.css files are not present when using NextJS 14 with TailwindCSS (as bundled out of the box when using NextJS' create-next-app). This basically renders all the components I import into stories to not have any styling. With the current instructions, it's just not possible to leverage Storybook in a project set up with NextJS & TailwindCSS.