Gatsby Tailwind Emotion Starter screenshot

Gatsby Tailwind Emotion Starter

Author Avatar Theme by Pauloelias
Updated: 25 Sep 2020
54 Stars

Gatsby starter using TailwindCSS 1.8+ and Emotion.

Categories

Overview

The Netlify StatusKick is a starter theme for Gatsby that combines Tailwind CSS and Emotion. It includes all the necessary packages and configuration files to quickly start a project using Tailwind CSS. This starter does not include stylelint, but it offers similar functionality to Andrew Welch’s setup described in his blog post “Using Tailwind CSS with Gatsby, React & Emotion Styled Components”. Additionally, for those who prefer using a Gatsby Theme instead of a Starter, there is an excellent theme created by Jordi Talens that can be layered on with other Gatsby themes.

Features

  • Tailwind CSS: Allows for easy styling of components using twin.macro to add Tailwind classes to the project.
  • Emotion: Provides best-in-class CSS-in-JS support, allowing for the creation of custom styled components with Emotion or the use of twin.macro inside styled components to incorporate Tailwind CSS classes.
  • PostCSS: Offers the flexibility of PostCSS to extend Tailwind’s CSS or write custom CSS. Postcss-Preset-Env is enabled by default, enabling the use of modern CSS features.

Installation

To install the Gatsby Tailwind Emotion Starter, follow these steps:

  1. Create a new Gatsby site using the Gatsby CLI by running the following command:
gatsby new my-gatsby-site https://github.com/username/repo
  1. Navigate into the newly created site’s directory:
cd my-gatsby-site
  1. Start the site:
gatsby develop
  1. Open the source code in your preferred code editor and make changes as needed. The live server will update the browser in real-time.

Summary

The Netlify StatusKick is a Gatsby starter theme that combines the power of Tailwind CSS and Emotion. It provides easy styling options using twin.macro, Emotion for custom styled components, and PostCSS for additional CSS flexibility. With this starter, developers can quickly kickstart their projects with a solid foundation for creating visually appealing and responsive web applications.