# `PhoenixKit.Install.DaisyUI`
[🔗](https://github.com/BeamLabEU/phoenix_kit/blob/v1.7.213/lib/phoenix_kit/install/daisyui.ex#L1)

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.

# `check`

```elixir
@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`

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

The host-side path of the vendored daisyUI plugin.

# `installed_version`

```elixir
@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`

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

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

# `outdated?`

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

Whether a daisyUI version string is below `minimum_version/0`.

# `outdated_warning`

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

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
