pixelpillow/statamic-tailwind-color-field

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

This Statamic field type lets you choose Tailwind color names for use in the frontend.

dev-main 2024-01-18 11:07 UTC

This package is auto-updated.

Last update: 2024-04-19 11:54:32 UTC


README

Tailwind color field is a Statamic addon that lets you define your Tailwind colors and use them in your blueprints.

Field in action: Scherm­afbeelding 2024-01-18 om 12 04 47

Field settings: CleanShot 2024-01-18 at 12 05 57@2x

How to Install

Add this addon by running the following command in your terminal:

composer require pixelpillow/statamic-tailwind-color-field

How to Use

Field Configuration

You can add the fieldtype to your blueprints like you would any other fieldtype that is already part of Statamic. For configuration, you simply add the Tailwind color fieldtype to your blueprint's fieldset. The fieldtype has the following configuration options:

  • Tailwind Colors: (required): A list of all the colors you want to use in your blueprint. You can add as many as you want. The fieldtype will automatically add a color picker for each color you add here. Use the key for the color name and the value for the hex code. Eg. for "bg-orange-500" you use "orange" => "#ff0000"
  • Default Value: Set a default value for the field eg. "orange"

... and that's it! You can now use the fieldtype in your blueprints.