FAQ

How big is a Nutin application?

A freshly generated application, built for production with the default options, ships about 30 KB of minified JavaScript, about 10 KB gzipped (9 KB with Brotli).

Nutin also has no runtime dependencies.

Does Nutin use a virtual DOM?

No. Components render HTML templates directly into the DOM, when you ask them to.

Can I use other libraries with Nutin?

Yes. Nutin works with the DOM and browser APIs directly, so most libraries work as they would in a vanilla application. See the a11y-elements and AlpineJS guides.

How is Nutin different from htmx?

In htmx, attributes let any element request HTML from the server and swap it into the page.
The browser mostly displays what it receives.

Nutin works on the client side: the application renders its own HTML and can be served as static files.

If you already have a server that renders HTML (Django, Rails, Laravel, Go), htmx is a natural fit.
If the interface lives in the browser, Nutin gives that client-side code a structure.

How is Nutin different from Lit?

Lit focuses on components. The application around them is left to you or to other packages.

Nutin provides that application structure, and its components are plain classes rendering plain HTML templates into the light DOM. Rendering is explicit rather than driven by reactive properties. See Why aren't components Web Components?.

The elements you build with Lit can also be used inside a Nutin application.

Isn't "your app owns the framework" what shadcn/ui does?

shadcn/ui is a collection of React components. Its CLI copies their source code into your project, so you can read and change your buttons and dialogs. React itself remains a regular dependency.

Nutin applies the same idea to the framework layer itself.
Its source code and its tools are generated into your project. When a new version comes out, nutin-update updates the files you haven't changed, and merges the new version into the ones you did: only overlapping edits are left for you to resolve.