Skip to content

Installation

The shortest path there is: two tags, no build, no package manager.

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/partialkit@0.1.0/dist/partialkit.min.css" />
<script type="module" src="https://cdn.jsdelivr.net/npm/partialkit@0.1.0/dist/partialkit.min.js"></script>
<button class="btn">Save</button>

Pin the version, as above. @latest means a release you have not read can change your pages while you sleep — and a CDN is a request to someone else’s server on every page load, which is a real dependency. Fine for a prototype; for production, serve the files yourself.

Two self-contained files. Nothing to resolve at runtime, and no Node in your project’s build.

  1. Get the files.

    Terminal window
    npm install partialkit
    cp node_modules/partialkit/dist/partialkit.min.css static/
    cp node_modules/partialkit/dist/partialkit.min.js static/
  2. Reference them from your layout.

    <link rel="stylesheet" href="/static/partialkit.min.css" />
    <script type="module" src="/static/partialkit.min.js"></script>
  3. Use a component.

    <button class="btn">Save</button>

dist/partialkit.css carries the design tokens, a preflight and the component classes — but no Tailwind utilities. Reach for it when partialkit’s own classes are all you need.

Import the source so Tailwind utilities and partialkit end up in one stylesheet.

@import "tailwindcss";
@import "partialkit/css/source";

Copy partialkit.min.css and partialkit.min.js from a release straight into static/. This is the same path as the drop-in, minus the package manager.

partialkit is 0.x, so a minor bump may carry a breaking change — each one is listed in the changelog with what to do about it. Pin an exact version and read the entry before moving.

partialkit needs <dialog>, the popover API, @starting-style and oklch(): Chrome 125+, Safari 17.4+, Firefox 125+. There are no polyfills.