PhoenixKit.Install.DaisyUI (phoenix_kit v1.7.199)

Copy Markdown View Source

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), so PhoenixKit ships no scrollbar-gutter compensations of its own (removed 2026-07-12) and relies on a modern daisyUI instead. Hosts on an old copy see daisyUI's stock old behavior until they upgrade — that's what the warning is for.

Summary

Functions

Check the host's vendored daisyUI against minimum_version/0.

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.

Functions

check()

@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 — no assets/vendor/daisyui.js (npm or custom setup)

host_path()

@spec host_path() :: Path.t()

The host-side path of the vendored daisyUI plugin.

installed_version(path)

@spec installed_version(Path.t()) :: String.t() | nil

Parse the daisyUI version out of a plugin bundle, or nil when the file is missing or carries no version = "x.y.z" marker.

minimum_version()

@spec minimum_version() :: String.t()

The minimum daisyUI version PhoenixKit's UI is designed against.

outdated?(version)

@spec outdated?(String.t()) :: boolean()

Whether a daisyUI version string is below minimum_version/0.

outdated_warning(version)

@spec outdated_warning(String.t()) :: String.t()

Human warning for an outdated vendored daisyUI, with upgrade steps.