- What is krakero/tailwind-fieldtype used for?
- It is a Statamic fieldtype for Tailwind CSS. It gives content editors a control panel interface for selecting and managing Tailwind utility classes, so styling stays consistent without requiring template edits.
- How do I install krakero/tailwind-fieldtype in a Laravel project?
- Install it with Composer using composer require krakero/tailwind-fieldtype. Statamic addons are generally auto-discovered, so after installation you can add the fieldtype to a blueprint and start using it in your control panel.
- Does krakero/tailwind-fieldtype work with Laravel and Statamic?
- Yes. It is built for Statamic, which runs on Laravel, so it fits Laravel applications that use Statamic for content management. It is not a standalone Laravel package for non-Statamic projects.
- How do editors select Tailwind classes with this fieldtype?
- Editors get a fieldtype UI in the Statamic control panel where they can choose and manage Tailwind utility classes. This keeps class selection inside the CMS instead of hard-coding styles in templates.
- Can I restrict which Tailwind utility classes editors can choose?
- The fieldtype is described as simple to configure, and configuration is where you would guide which utility classes are available or acceptable. Check the README for the exact configuration keys before relying on restrictions in a client project.
- Do I still need a Tailwind CSS build step when using this fieldtype?
- Yes. The fieldtype manages class names in content, but Tailwind still needs to be compiled or served by your frontend build so those classes produce CSS. Make sure your Tailwind content configuration scans the templates where the field value is output.
- Which Tailwind and Statamic versions does krakero/tailwind-fieldtype support?
- The provided project context does not list specific Tailwind or Statamic version constraints. Check the repository README and composer.json before installing to confirm compatibility with your Laravel, Statamic, and Tailwind versions.
- How do I output the selected Tailwind classes in my Statamic templates?
- Selected classes are stored as field data in Statamic, and you output that value in your Antlers or Blade templates where the classes are needed. Keep the output escaped appropriately and ensure your Tailwind build can see the resulting class names.
- Is krakero/tailwind-fieldtype suitable for production use?
- It is described as lightweight and easy to install, which suits production use when the package fits your stack. Before adopting it, review the GitHub repository for recent commits, releases, open issues, and compatibility notes.
- What are alternatives to using a Tailwind fieldtype in Statamic?
- Alternatives include a standard Statamic text or textarea field with a documented class allowlist, or a custom fieldtype tailored to your design system. A Tailwind-specific fieldtype like this one can reduce editor errors, but compare it with your existing blueprint and validation needs.