Skip to content

Instantly share code, notes, and snippets.

@crock
Forked from Khaledgarbaya/postcss.config.js
Last active May 7, 2020 17:22
Show Gist options
  • Save crock/67dccc607bb3306bb257d7bc29eddd07 to your computer and use it in GitHub Desktop.
Save crock/67dccc607bb3306bb257d7bc29eddd07 to your computer and use it in GitHub Desktop.
Gatsby TailwindCSS + TUI Recipe
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
}
const defaultTheme = require('tailwindcss/defaultTheme')
module.exports = {
theme: {
extend: {
fontFamily: {
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
},
}
},
variants: {},
plugins: [require('@tailwindcss/ui')]
}
@import url(https://rsms.me/inter/inter.css);
@tailwind base;
@tailwind components;
@tailwind utilities;

Setup Gatsby with TailwindCSS + TailwindUI (TUI)

Tailwind CSS is a highly customizable, low-level CSS framework that gives you all of the building blocks you need to build bespoke designs without any annoying opinionated styles you have to fight to override.


Install necessary NPM packages


Install necessary Gatsby Plugins


Setup necessary Files

You are good to go

import React from "react"
import '../styles/tailwind.css'
export default () => (<h1 className="text-3xl">This is a 3xl text</h1>)
@pascalandy
Copy link

OK, I understand you don't need AlpineJS. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment