Skip to content

[tailwindcss]: Β #663

Open
Open
@aaronm-git

Description

Details

Recipe Page: tailwindcss
Recipe Template: tailwindcss

What is wrong

You MUST add this to the tailwind config in NEXTjs 14 with tailwind implementation:

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    "./pages/**/*.{js,ts,jsx,tsx}",
    "./components/**/*.{js,ts,jsx,tsx}",
    "./app/**/*.{js,ts,jsx,tsx}",
    "./stories/**/*.{js,ts,jsx,tsx}", // Here!
  ],
  theme: {
    extend: {
      backgroundImage: {
        "gradient-radial": "radial-gradient(var(--tw-gradient-stops))",
        "gradient-conic":
          "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))",
      },
    },
  },
  plugins: [],
};

otherwise tailwind will NOT work in storybook. Took me 2 days to figure this out. Almost stopped trying to use Storybook.

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions