The Problem
Phoenix 1.8 comes aggressively coupled with Daisy UI, a decision which many developers in the community have had mixed feelings about.
While some agree that Daisy brings a lot of flexibility for quick and easy prototyping, there are many that are not happy with its look & how it cripples tailwind (sizes, color pallet etc)
Library maintainers are forced to provide 2 options for their UI elements- one with Daisy and one without it.
The mix phx.new
command generates a web app with daisy- so there’s no option if anyone wants to opt out.
Migrating from a generated Daisy app to a pure tailwind app is a huge headache- as simply removing Daisy wont cut it. The generated core_components.ex
& root.html.heex
contain references to Daisy styles which will not work out of the box with tailwind, causing unexpected behavior in many cases. Its required to change all these styles manually.
Even the dark mode toggle won’t function as expected after deleting daisy.
From the time I’ve upgraded to Phoenix 1.8 release candidates, I’ve found myself using Daisy rarely, and migrating every time has became a nuisance.
Proposed Solution
I propose we allow a --no-daisy
flag to be passed when creating a new project. This creates a phoenix app with just tailwind - allowing comfortable migration for developers who want to opt out.
This will be analogous to the existing --no-tailwind
flag, which creates a project without any css framework.
Would love to work on this. Any suggestions or advice is welcome!