We ran into a fairly subtle migration issue upgrading from:
- Flowbite React v0.10.x + Tailwind v3
to
- Flowbite React v0.12.x + Tailwind v4
and wanted to document the findings and ask for guidance on the intended migration path.
What changed for us
After upgrading, a number of input fields across our application suddenly lost their styling (especially padding/spacing), including components that do not use Flowbite React at all.
Initially this was confusing because the affected components were unrelated to Flowbite.
After tracing through the generated CSS, we found that the old integration path implicitly injected global form styles, while the new Tailwind v4 integration no longer does.
Flowbite React 0.10 injects global styles
With Tailwind v3 we had:
const flowbite = require("flowbite-react/tailwind");
plugins: [
flowbite.plugin(),
]
It seems that flowbite.plugin() internally routed through the standalone flowbite/plugin.
That plugin appears to have had forms = true enabled by default and injected global base styles via addBase(...), including selectors like:
[type='text'],
[type='email'],
textarea,
select {
padding: .5rem .75rem;
...
}
Flowbite React v0.12 no longer creates global stzles
With Tailwind v4 / Flowbite React v0.12 the recommended setup is
@import "flowbite-react/plugin/tailwindcss";
@source "../../.flowbite-react/class-list.json";
This new CSS-first integration path no longer appears to route through the standalone flowbite/plugin, and the global form base styles disappear.
As a result:
- unrelated inputs lose padding/styling
- applications may experience visual regressions outside Flowbite components
- the migration impact is difficult to trace back to Flowbite
Questions
- Is this an intended behavioral change? Is my analyis correct that flowbite v0.10 injected global styles?
- Is there an officially recommended migration path for users who implicitly depended on the old global form reset behavior?
- Would it make sense to mention this in the migration docs / compatibility docs?
This was particularly difficult to debug because the regressions appeared in components that did not use Flowbite at all.
We ran into a fairly subtle migration issue upgrading from:
to
and wanted to document the findings and ask for guidance on the intended migration path.
What changed for us
After upgrading, a number of input fields across our application suddenly lost their styling (especially padding/spacing), including components that do not use Flowbite React at all.
Initially this was confusing because the affected components were unrelated to Flowbite.
After tracing through the generated CSS, we found that the old integration path implicitly injected global form styles, while the new Tailwind v4 integration no longer does.
Flowbite React 0.10 injects global styles
With Tailwind v3 we had:
It seems that
flowbite.plugin()internally routed through the standaloneflowbite/plugin.That plugin appears to have had
forms = trueenabled by default and injected global base styles viaaddBase(...), including selectors like:Flowbite React v0.12 no longer creates global stzles
With Tailwind v4 / Flowbite React v0.12 the recommended setup is
This new CSS-first integration path no longer appears to route through the standalone
flowbite/plugin, and the global form base styles disappear.As a result:
Questions
This was particularly difficult to debug because the regressions appeared in components that did not use Flowbite at all.