Skip to content

Instantly share code, notes, and snippets.

@Khaledgarbaya
Last active April 28, 2020 12:08
Show Gist options
  • Save Khaledgarbaya/c2c3b5096c757df27421fc7280d689cf to your computer and use it in GitHub Desktop.
Save Khaledgarbaya/c2c3b5096c757df27421fc7280d689cf to your computer and use it in GitHub Desktop.
Gatsby Tailwincss Recipe
module.exports = {
plugins: [require("tailwindcss"), require("autoprefixer")],
}
module.exports = {
theme: {
extend: {}
},
variants: {},
plugins: []
}
@tailwind base;
@tailwind components;
@tailwind utilities;

Setup Gatsby with Tailwindcss

Tailwindcss 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>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment