Installation
From a CDN
Section titled “From a CDN”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.
Drop-in
Section titled “Drop-in”Two self-contained files. Nothing to resolve at runtime, and no Node in your project’s build.
-
Get the files.
Terminal window npm install partialkitcp node_modules/partialkit/dist/partialkit.min.css static/cp node_modules/partialkit/dist/partialkit.min.js static/ -
Reference them from your layout.
<link rel="stylesheet" href="/static/partialkit.min.css" /><script type="module" src="/static/partialkit.min.js"></script> -
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.
With your own Tailwind build
Section titled “With your own Tailwind build”Import the source so Tailwind utilities and partialkit end up in one stylesheet.
@import "tailwindcss";@import "partialkit/css/source";import "partialkit/auto";Vendored, no npm
Section titled “Vendored, no npm”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.
Versions
Section titled “Versions”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.
Browser support
Section titled “Browser support”partialkit needs <dialog>, the popover API, @starting-style and oklch(): Chrome 125+,
Safari 17.4+, Firefox 125+. There are no polyfills.