Skip to content

add tailwind into this template #14

Answered by yaffalhakim1
yaffalhakim1 asked this question in Q&A
Discussion options

You must be logged in to vote

I found how to this.

  1. install tailwind for nextjs like usual from the tailwind docs

  2. add mdx and theme.config.tsx like this in your tailwind config
    ` content: [
    "./app//*.{js,ts,jsx,tsx,mdx}",
    "./pages/
    /.{js,ts,jsx,tsx,mdx}",
    "./components/**/
    .{js,ts,jsx,tsx,mdx}",
    "./theme.config.tsx",

    // Or if using src directory:
    "./src/**/*.{js,ts,jsx,tsx, mdx}",
    ],`

  3. add the @ tailwindbase etc into a file that you created with name styles.css

  4. import it in _app.mdx, create one if you don't have _app.mdx file

  5. done

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by yaffalhakim1
Comment options

You must be logged in to vote
1 reply
@ninjasweb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants