Skip to main content
Copy for LLM

Dependencies

WireKit is transparent about every dependency it uses. All bundled dependencies are MIT-licensed.

PHP Dependencies (via Composer)

Runtime Requirements

  • PHP ^8.4
  • Laravel ^12.0 || ^13.0

Required Packages

Package Version License Purpose
illuminate/console ^12.0 || ^13.0 MIT The wirekit:* Artisan commands
illuminate/contracts ^12.0 || ^13.0 MIT Laravel contracts
illuminate/support ^12.0 || ^13.0 MIT Laravel support utilities
illuminate/view ^12.0 || ^13.0 MIT Blade rendering
livewire/livewire ^4.0 MIT Livewire component runtime — required for interactive components. Livewire v4 also bundles Alpine.js, so a separate Alpine install is not needed

Front-end Toolchain (you must install these in your app)

WireKit's components emit Tailwind utility classes and Alpine.js directives. Your application is responsible for the JS / CSS toolchain that processes them:

Package Install Why
tailwindcss (v4) npm install tailwindcss @tailwindcss/vite Required — components use Tailwind utility classes. The @tailwindcss/vite plugin must be registered in vite.config.js
alpinejs Already bundled by Livewire v4 (no install) Required — components use x-data / x-bind / x-on. A page that renders no @livewireScripts can load the self-contained wirekit-alpine.js instead, which starts an Alpine of its own; see Choosing a JS bundle

Optional (via suggest)

Package License Purpose
blade-ui-kit/blade-icons MIT Icon rendering engine (required for icon system)
blade-ui-kit/blade-heroicons MIT Icon preset: Heroicons — one glyph catalog shipped four times over, as mini, outline, solid and micro, so its file count is four times its glyph count
mallardduck/blade-lucide-icons MIT Icon preset: Lucide — one file per glyph, plus a separate lab glyph catalog beside it
codeat3/blade-phosphor-icons MIT Icon preset: Phosphor — one glyph catalog in six weights, so its file count is six times its glyph count
secondnetwork/blade-tabler-icons MIT Icon preset: Tabler — one file per glyph, outline and filled in the one catalog

The rows say how each package is packaged rather than how large it is. A file is a glyph in some of these catalogs and one style of a glyph in others, so the two numbers are not comparable — and every catalog grows on its own upstream release schedule, which this library does not pin. For a current size, read the preset you are considering at its source.

JavaScript Dependencies (Bundled)

These are compiled into dist/wirekit.js and the bundles built from the same sources (wirekit.esm.js, wirekit-alpine.js, wirekit-alpine.csp.js) — no npm install needed by the user. They are pre-compiled and included in the package distribution.

Package License Purpose
@floating-ui/dom MIT Dropdown / Popover / Tooltip / Menubar positioning
@floating-ui/core MIT Positioning core (transitive)
@floating-ui/utils MIT Positioning helpers (transitive)
focus-trap MIT Modal / Drawer / Command-palette focus management
tabbable MIT Focusable element detection (transitive)
@alpinejs/collapse MIT The height animation used by Collapsible, Sidebar groups and Tree View nodes

The two self-contained bundles additionally carry the Alpine they start: wirekit-alpine.js bundles alpinejs, and wirekit-alpine.csp.js bundles @alpinejs/csp (both MIT).

No version column, deliberately: a range written here says what was permitted when the table was last edited, and it drifted away from what npm installs. Every bundle's own license header names each package at the exact version it was compiled at, and that header is generated from the packages themselves — so it cannot say something the file does not contain.

dist/wirekit.core.js contains no external dependencies — it carries the chart and image-compare Alpine components, the scripts of a toggle button that flips itself, of the text beside a native color picker and of the two fields of a date picker range, the x-wk-indeterminate, x-wk-grouped-digits, x-wk-findable, x-wk-focus-first and x-wk-focus-unit directives the zero-JS form and disclosure primitives need, the x-wk-ref directive that lets a ref you write on a field component reach your own component's $refs, and the x-wk-fit-text directive that keeps a fitted text in step with words your script writes. Use the core bundle if you don't need overlay components (Dropdown, Tooltip, Modal, Drawer).

Stylesheet

WireKit ships one stylesheet in two forms. @wirekitStyles links the minified one; the readable one is published beside it so you can read what a token means and where it is used. With compact classes on, @wirekitStyles links a third file after it.

Bundle File Contains Size
Stylesheet dist/wirekit.min.css Every design token, component class and keyframe — the file @wirekitStyles links ~32 KB gzip (267 KB raw)
Compact classes dist/wirekit-compact.css The Tailwind utilities the components write, each under a short name. @wirekitStyles links it after the stylesheet while compact classes are on ~19 KB gzip (142 KB raw)
Stylesheet (readable) dist/wirekit.css The same rules, fully commented. Published for reading, never linked — the comments are two thirds of the file, so it is several times the minified one and grows whenever a rule gains an explanation. not size-tracked — see dist/README.md for the current figure
The comments are the design system's documentation

The readable file explains why each token has the value it has, and the minified one is generated from it, so the two always agree. Only the minified one is on the critical path, and it is render-blocking, so what the reader waits for is the minified file rather than the readable one — a large multiple smaller on every uncached page-view.

JavaScript Bundles

WireKit ships several pre-built JavaScript bundles:

Bundle File Contains Size
Full dist/wirekit.js All Alpine components + Floating UI (incl. size middleware) + focus-trap + animation helper + reading-spine + reading-minimap (stripes + rendered modes + hover-preview/bookmark/heading-anchor/idle-fade extensions) + chart wireStream/annotations ~209 KB gzip (730 KB raw)
Core dist/wirekit.core.js Chart and image-compare Alpine components, the scripts of a toggle button that flips itself, of the text beside a native color picker and of the two fields of a date picker range, plus the x-wk-indeterminate, x-wk-grouped-digits, x-wk-findable, x-wk-focus-first, x-wk-focus-unit, x-wk-ref and x-wk-fit-text directives, the scroll inset that keeps a focused element clear of a pinned bar, the mark that keeps the focus ring on a radio the arrow keys reach in WebKit, wirekit:focus-invalid, which takes the focus to the first rejected field, data-wk-submit-once, which sends a form once, the server's state on a toggle, a checkbox or a radio that calls an action of its own once its request has ended, and the status region that says an alert a Livewire render adds — no third-party dependencies. Installs the empty overlay ROOT even so: a missing teleport target throws and takes the page down, where an unregistered component is merely inert ~23 KB gzip (71 KB raw)
ESM dist/wirekit.esm.js Every component as an ES module, each exported by name so your bundler can drop the ones you never render. The size on the right is all of them; what one component costs is measured under Importing only the components you use ~211 KB gzip (737 KB raw)
Per page dist/auto/ The shared runtime and one module per component, loaded by @wirekitScripts under 'bundle' => 'auto': a page imports the components its markup starts, see Only the components a page starts Depends on the page: about a third of Full on this documentation's pages
ApexCharts adapter dist/wirekit-apex.js Optional opt-in: wirekitApexChart Alpine factory only — does not bundle ApexCharts itself; you install apexcharts via npm (see User-Installed Dependencies below). ApexCharts is non-MIT — see Chart docs for terms. ~18 KB gzip (55 KB raw)
Tiptap editor adapter dist/wirekit-tiptap.js Optional opt-in: wirekitEditor Alpine factory only — pairs with the Core bundle so you can add the rich-text <x-wirekit::editor> without loading the Full overlay bundle. Does not bundle Tiptap itself; you install @tiptap/core + @tiptap/starter-kit via npm and expose a window.tiptapEditor(config) factory (see Editor docs). The editor is also in the Full bundle — load this only alongside Core. ~6 KB gzip (19 KB raw)
Optimistic UI dist/wirekit-optimistic.js Optional opt-in: the wirekitOptimistic Alpine factory only — shows the result of an action before the server has confirmed it, then confirms or rolls back. Deliberately absent from the Full bundle: loading it is how you accept its announcement behavior, so applications that do not use it pay nothing. Load it alongside whichever bundle you already use. ~4 KB gzip (9 KB raw)
Theme script dist/wirekit-theme.js The script @wirekitThemeScript renders: it applies the reader's stored theme before the first paint. Written into the page by default, and loaded as this file when wirekit.theme.script is external, for a Content Security Policy that allows no inline script. Nothing to load by hand. ~1 KB gzip (1 KB raw)

The ESM bundle is for manual import in your own build pipeline (e.g. Vite). It is not selectable via the config — use import in your JavaScript instead.

Only the components a page starts

With 'bundle' => 'auto', a page loads the shared runtime and the components its markup starts, and nothing else. Each component is an ES module of its own in dist/auto/, and the parts they share, Floating UI among them, are chunks a page loads once.

'scripts' => [
    'bundle' => 'auto',
],

@wirekitScripts stays where it is, before @livewireScripts at the end of <body>. Once the response is complete, WireKit reads which components the page starts, whether a WireKit component or your own markup wrote the x-data, and writes one module script that imports exactly those, with a preload of every file they import. A component that a later Livewire update or a wire:navigate visit adds loads its module first and starts once it is there. On the pages of this documentation, whose own frame starts a command palette, a drawer, a modal and a toast, a page loads about a third of the JavaScript of the Full bundle, and a little under half of it compressed.

A response nothing rewrites

The rewrite runs in Laravel's web middleware group. A page served outside it keeps the tag of the Full bundle that @wirekitScripts writes first, and works as it does on 'full'.

Under a Content Security Policy the module script carries the nonce you hand @wirekitScripts($nonce), and every module it imports comes from your own origin, so script-src 'self' 'nonce-…' covers them. A policy without 'unsafe-eval' takes the same lever as the Full bundle: Livewire's CSP build, as A Livewire app: keep the default bundle, switch Livewire shows.

Importing only the components you use

Importing the default export registers every component, which is the right trade when you render most of them:

// 1. The whole library — every component available, one line of setup.
import WireKit from '../../vendor/pushery/wirekit/dist/wirekit.esm.js';

Alpine.plugin(WireKit);

If your application only renders a handful, import those by name and hand them to register() instead. Your bundler drops everything you did not name:

// 1. `register` installs the shared runtime; the rest are the components you want.
//    The names are the same ones the Blade components emit into `x-data`.
import {
    register,
    wirekitDropdown,
    wirekitModal,
    wirekitTooltip,
} from '../../vendor/pushery/wirekit/dist/wirekit.esm.js';

// 2. Register just those three. Anything not passed here is never referenced,
//    so your bundler removes it from the output entirely.
Alpine.plugin((Alpine) => register(Alpine, { wirekitDropdown, wirekitModal, wirekitTooltip }));

A layout whose pages load such a module needs no @wirekitScripts. With the icon sprite on, @wirekitIconSprite before </body> writes its glyphs in place of the directive. php artisan wirekit:doctor counts a module under resources/js that imports the default export or register from wirekit.esm.js in place of the directive, and php artisan wirekit:install leaves the directive out of your layouts while one exists.

Measured with esbuild (--bundle --minify --format=esm), for an application that imports and uses the result:

What you import Raw Gzip
The default export (every component) 728 KB 208 KB
Five components via register() (dropdown, modal, tooltip, combobox, tabs) 193 KB 60 KB
One component via register() (dropdown) 123 KB 40 KB

The shared runtime — overlay positioning, the teleport root and the collapse plugin — is included in every figure above, which is why one component costs far more than the whole divided by the number of components.

Which names a component needs

A component can start more than one factory. A dropdown starts one for its trigger and one for its submenus as well, and a component that renders another one needs that one's factory too, such as the tooltip inside a status dot. The API map lists them for every component under factories, the tooltips, submenus and charts it renders included:

# 1. The factories the dropdown, the modal and the combobox start, as one list to import.
php artisan wirekit:export-api-map \
  | jq -r '[.groups[] | select(.id == "components") | .items[]
      | select(.id == ("dropdown", "modal", "combobox")) | .factories[]] | unique | join(", ")'

A factory you leave out shows up in the browser console as the name Alpine cannot find, on the page that renders the component.

Under a Content Security Policy

A page whose policy has no 'unsafe-eval' runs Alpine's CSP build, and register() takes that Alpine like any other. In a Livewire application, Livewire's CSP build carries the Alpine it starts:

// 1. Livewire's CSP build, and the Alpine it brings with it.
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.csp.esm.js';
import {
    register,
    wirekitDropdown,
    wirekitModal,
    wirekitTooltip,
} from '../../vendor/pushery/wirekit/dist/wirekit.esm.js';

// 2. The components join that Alpine before it starts.
register(Alpine, { wirekitDropdown, wirekitModal, wirekitTooltip });

// 3. Livewire starts Alpine.
Livewire.start();

The layout then renders @livewireScriptConfig where @livewireScripts stood, and no @wirekitScripts: the bundle above already carries what WireKit runs. The overlay container takes its translated name from your layout instead, as The overlay container shows.

Without Livewire, Alpine's own CSP build takes its place, installed with npm install @alpinejs/csp:

// 1. Alpine's CSP build.
import Alpine from '@alpinejs/csp';
import { register, wirekitDropdown } from '../../vendor/pushery/wirekit/dist/wirekit.esm.js';

// 2. The component joins it, and it starts as the page's Alpine.
register(Alpine, { wirekitDropdown });
window.Alpine = Alpine;
Alpine.start();
Your bundler has to be doing the dropping

These numbers require a bundler with tree-shaking enabled — the default in Vite, Rollup and esbuild production builds. Load dist/wirekit.esm.js directly in the browser with a plain <script type="module"> and nothing is dropped: you download all of it, silently, with no warning from anything. Use the Full bundle for that case instead.

Choose your bundle in config/wirekit.php:

'scripts' => [
    'bundle' => 'full', // 'full', 'core', 'auto' or 'csp'
],

User-Installed Dependencies

These are not bundled — install them separately if you need them:

Package Install Purpose
Chart.js npm install chart.js Required for <x-wirekit-chart> when charts.library = chartjs (the default).
ApexCharts npm install apexcharts Required for <x-wirekit-chart> when charts.library = apexcharts. Non-MIT — see Chart docs for license tiers (Community free under $2M USD revenue, Commercial above). Expose globally via window.ApexCharts = ApexCharts; and load dist/wirekit-apex.js after dist/wirekit.js in your layout. The supported majors, and the check wirekit:verify runs on yours, are under Requirements.
Tiptap npm install @tiptap/core @tiptap/starter-kit Required for <x-wirekit::editor> (the rich-text editor). MIT core; optional Pro extensions (@tiptap-pro/*) are commercial. Expose a window.wirekitEditor(config) factory (the legacy window.tiptapEditor name still works as a deprecated alias) — see Editor docs. The editor falls back to a <textarea> if the engine is absent.
Icon packages composer require blade-ui-kit/blade-icons blade-ui-kit/blade-heroicons Required for <x-wirekit::icon>
QR code generator composer require bacon/bacon-qr-code Required for <x-wirekit::qr-code>, which renders the SVG server-side. Without it the component renders a labeled placeholder in the code's place — the same size box, the same role="img" accessible name — instead of the code itself, so a page carrying one still renders. wirekit:doctor reports it as optional-and-absent.
Laravel MCP SDK (optional) composer require laravel/mcp Serves wirekit:mcp-serve through the Laravel MCP SDK and the protocol revisions it maintains. Without it the command uses its own loop, which speaks revision 2025-06-18 only. Needs Laravel 12.41.1 or newer.
Syntax highlighter (optional) npm install highlight.js (or Prism) Optional for <x-wirekit::code-block>. WireKit emits data-language="…" as a hook attribute on the <code> tag, and ships no highlighter of its own

Wiring a syntax highlighter (optional)

<x-wirekit::code-block language="php"> emits <code data-language="php">, and no language-* class. highlight.js and Prism both read the language from that class, so hand it over from the attribute first:

// resources/js/app.js — highlight.js example
// 1. The core, the languages you show, and a theme.
import hljs from 'highlight.js/lib/core';
import php from 'highlight.js/lib/languages/php';
import 'highlight.js/styles/github-dark.css';
import { wirekitCodeJoins } from '../../vendor/pushery/wirekit/resources/js/utils/code-joins.js';
hljs.registerLanguage('php', php);

// 2. A block with `wrap` keeps `->` and `--force` whole through highlighting.
hljs.addPlugin(wirekitCodeJoins);

document.addEventListener('DOMContentLoaded', () => {
    document.querySelectorAll('code[data-language]').forEach((el) => {
        // 3. The code block names the language in data-language; the highlighter reads a class.
        el.classList.add(`language-${el.dataset.language}`);
        hljs.highlightElement(el);
    });
});

With Prism.js, the same loop ends in Prism.highlightElement(el), between wirekitCodeJoins.release(el) and wirekitCodeJoins.apply(el); the code block page says what the two do. Shiki highlights on the server rather than in the page.

License Headers

All bundled JavaScript files open with a license header naming every third-party package compiled into that file, at the exact version it was compiled at, with its license. This ensures compliance even when the source files are not distributed.

The header is generated at build time and reads back what is actually installed, so it describes the file you are holding rather than the range that was permitted when it was built. It takes this shape:

/*! WireKit v<version> | MIT License | https://wirekit.app
 * Bundled:
 *   <package> <version> (<license>)
 *   … one line per package …
 */

The list differs per bundle — wirekit.core.js carries no third-party code at all and so carries no Bundled: block, while wirekit-alpine.js and wirekit-alpine.csp.js additionally name the Alpine distribution they bundle. Read the first lines of the file itself for the authoritative list:

head -12 vendor/pushery/wirekit/dist/wirekit.js

Was this page helpful?

Thank you for your feedback!

Voting requires cookies or local storage. What we store