krakero/tailwind-fieldtype

There is no license information available for the latest version (2.0.3) of this package.

2.0.3 2023-10-28 21:27 UTC

This package is auto-updated.

Last update: 2024-04-28 22:33:08 UTC


README

Tailwind Fieldtype is a Statamic addon that provides a Tailwind color picker.

NOTE: This fieldtype does not ensure the CSS classes are available in your frontend.

Features

  • Choose "advanced" mode for all shades
  • Choose "simple" mode for just a single color selection
  • Add a prefix like bg or text, so the class is ready to go (e.g. bg-red-500)

How to Install

You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:

composer require krakero/tailwind-fieldtype

How to Use

Once you install the addon you will need to run krakero:tailwind-config. This command will look for the tailwind.config.js file located in your project root and generate a tailwind.config.php file for use by all Tailwind Picker fields.

NOTES:

  • If you make changes to your config file you will need to run this command again.
  • The tailwind.config.php file should be committed with your code.
  • This package needs to run npm install in its directory to be able to convert the config file