Skip to content

Tailwind Config 2x

tanthammar edited this page May 4, 2021 · 7 revisions

Install Tailwind

The default styling is based on Tailwindcss, TailwindUI is not required, but I urge you to get a license to support Adam for maintaining Tailwind. Read more on tailwindcss.com ->

Install required plugins

npm install -D laravel-mix alpinejs tailwindcss@latest postcss-import postcss-nesting autoprefixer@latest @tailwindcss/forms @tailwindcss/typography @tailwindcss/aspect-ratio --save-dev

Update your tailwind.config.js to import the tall-forms-preset.js:

The preset merges, fonts, variants, plugins, colors and purge settings

module.exports = {
    mode: 'jit', //https://tailwindcss.com/docs/just-in-time-mode#enabling-jit-mode
    presets: [
        // the preset merges, fonts, variants, plugins, colors and purge settings
        require('./vendor/tanthammar/tall-forms/resources/stubs/tailwindcss/2.0/tall-forms-preset.js'),
    ],
    darkMode: false, // or 'media' or 'class'
    theme: {
        extend: {}
    },
    variants: {},
    plugins: [],
};

Next step -> setup Laravel Mix

Clone this wiki locally