--- title: Tailwind Setup --- {% include_relative includes/_header.html %}

Our general Tailwind setup involves a frontend.config.json and the usual tailwind.config.js file.

We use values from this JSON file inside the Tailwind config to separate Tailwind config itself from front end site data. This JSON file is often read by a project's Webpack set up, a project's JavaScript and a project's CMS. This set up is, of course, not mandatory to use these plugins, but they may still prove inspiration for your Tailwind set up all the same.

This documentation site is made using Tailwind and AREA 17 tailwind plugins, this page documents the config files used for this site.

tailwind.config.js

tailwind.config.js
{% include_relative tailwind.config.js %}

Breaking that down a little. Firstly require the plugins and then bring in the front end config file. Then set up Tailwind, JIT if you prefer.

As we have a custom container plugin, we disable the default Tailwind container class.

Then we bring in the plugins.

Then some we set the various TW theme items to their counterparts in the config JSON - with some examples like spacing and colours use plugins as functions to process values from the config JSON.

And finally, a few useful spacing extends.

frontend.config.json

Our config JSON is broken down into:

And so, in full:

frontend.config.json
{% include_relative frontend.config.json %}
{% include_relative includes/_footer.html %}