The component is the unit
A droplet is one component with its own URL, served by a small Hono server. Ask for it as an HTML fragment; it brings its own data, styles and JavaScript.
npm create droplets@latest my-widgetsGitHub · npm · MIT licensed
Droplets serves each of your components at its own URL, as a fragment of server-rendered HTML. Any server that can make an HTTP request (nginx, PHP, WordPress, Express, Next.js, FastAPI) fetches the fragment, pastes it into its page and loads one script; the component then comes alive there, with its own data, styles and JavaScript.
It is for teams that need the same interactive widgets in several apps or stacks, that add components to an existing site piece by piece, or that ship UI on their own schedule. For one application in one framework, that framework’s own meta-framework does the job better.
<!-- Any page, any server: paste the fragment, load one script. --><script type="module" src="https://drops.example.com/index.js"></script>
<acme-widgets data-droplet="hello"> <!-- GET https://drops.example.com/droplets/hello?who=Ana --> <h1>Hello Ana!</h1></acme-widgets>The component is the unit
A droplet is one component with its own URL, served by a small Hono server. Ask for it as an HTML fragment; it brings its own data, styles and JavaScript.
Server-rendered, hydrated when it matters
Each droplet decides whether it renders on the server, whether and when it hydrates (at once, when visible, on first interaction) and whether it is prerendered.
Any framework, side by side
Renderers for Svelte, Vue, React, Preact, Solid, Hono JSX, Handlebars and Lit, or a plain script. Droplets in different frameworks share a project and a page.
Host it from anything
Fetch the fragment, paste it in, load one script. The same shop runs on each of these:
Plain Vite
vite dev with hot updates on any host page, vite build for the browser and the server,
node dist/server.js, Bun, Deno or a Cloudflare Worker to run.
Errors have a place
Every droplet can have its own error page, rendered on the server or in the browser when a load or the component fails.
Droplets grew out of SvelteKit: + files, loads, form actions,
hooks and prerendering, reshaped for components that live inside someone
else’s page. It is an independent project, not affiliated with Svelte or
SvelteKit. What is a droplet? explains the rest.