Advisory check of the host's vendored daisyUI version.
PhoenixKit's UI is styled by daisyUI, which lives in the HOST app
(assets/vendor/daisyui.js + daisyui-theme.js, scaffolded by
mix phx.new and loaded from the host's app.css). The host owns that
file — PhoenixKit does not manage or replace it; it only checks it.
mix phoenix_kit.install, mix phoenix_kit.update, and
mix phoenix_kit.doctor warn when the vendored copy is older than
minimum_version/0, with upgrade instructions.
Why the minimum matters: daisyUI < 5.1 reserves the modal scrollbar gutter
UNCONDITIONALLY while a modal/drawer is open, which either leaves a phantom
right-edge strip on non-scrolling pages or (when countered) makes content
reflow ~15px around every modal open/close on scrolling pages. daisyUI
≥ 5.1 reserves the gutter only when the page really has a scrollbar
(rootscrollgutter.css), and 5.6.0 finished the job for modals
(scrollbar-gutter: auto), so PhoenixKit ships no scrollbar-gutter
compensations of its own (removed 2026-07-12) and relies on a modern
daisyUI instead.
Two warning bands
Those are two different situations, and outdated_warning/1 says so
(severity/1 picks the copy):
:broken— belowgutter_fix_version/0(5.1.0). Modals genuinely misbehave; upgrading is the fix.:behind— at/above 5.1.0 but belowminimum_version/0. Modals render correctly; the host is simply short of the version core is verified against. Purely a heads-up — notably,mix phx.newcurrently vendors 5.5.19, so a freshly scaffolded app lands in this band and must not be told it has a rendering bug.
Summary
Functions
Check the host's vendored daisyUI against minimum_version/0.
The daisyUI version that made the modal scrollbar gutter conditional.
The host-side path of the vendored daisyUI plugin.
Parse the daisyUI version out of a plugin bundle, or nil when the file is
missing or carries no version = "x.y.z" marker.
The minimum daisyUI version PhoenixKit's UI is designed against.
Whether a daisyUI version string is below minimum_version/0.
Human warning for an outdated vendored daisyUI, with upgrade steps.
How bad an outdated version actually is.
Functions
@spec check() :: :ok | {:outdated, String.t()} | :unversioned | :missing
Check the host's vendored daisyUI against minimum_version/0.
:ok— present and at/above the minimum{:outdated, version}— present but older than the minimum:unversioned— present but carries no parseable version marker:missing— noassets/vendor/daisyui.js(npm or custom setup)
@spec gutter_fix_version() :: String.t()
The daisyUI version that made the modal scrollbar gutter conditional.
Below this, modals visibly misbehave; at or above it they render correctly
even when the copy is older than minimum_version/0.
@spec host_path() :: Path.t()
The host-side path of the vendored daisyUI plugin.
Parse the daisyUI version out of a plugin bundle, or nil when the file is
missing or carries no version = "x.y.z" marker.
@spec minimum_version() :: String.t()
The minimum daisyUI version PhoenixKit's UI is designed against.
Whether a daisyUI version string is below minimum_version/0.
Human warning for an outdated vendored daisyUI, with upgrade steps.
The copy follows severity/1: a real bug report below
gutter_fix_version/0, an advisory heads-up above it.
@spec severity(String.t()) :: :broken | :behind
How bad an outdated version actually is.
:broken— belowgutter_fix_version/0; modals mishandle the gutter.:behind— older thanminimum_version/0but rendering correctly.
Unparseable versions get the benign verdict — never accuse a host of a rendering bug we could not confirm.