npm-free

Nothing in gsxui requires Vite — or npm. The component behaviors are dependency-free native ES modules, and the one CSS dependency is vendored, so the stylesheet builds without node_modules. (The recommended setup is still the scaffold from Getting Started.)

Initialize without a scaffold

If gsxui init finds neither vite.config.ts nor web/main.js, it initializes in npm-free mode: no npm commands run, no package.json is written. The same CSS and JS entries are vendored and the Go tooling is installed as usual.

gsxui initialized (no Vite scaffold detected — npm-free mode).
  css:  web/gsxui/index.css
  js:   web/gsxui/index.js
  next: gsxui add button

Serve and build with your own tooling:
  1. serve web/gsxui/ statically and load it with
     <script type="module" src="/your-prefix/index.js"></script>
  2. build web/gsxui/index.css with any Tailwind v4 tool, for example the
     standalone tailwindcss binary (no npm needed):
     tailwindcss -i web/gsxui/index.css -o dist/gsxui.css
     (or npx @tailwindcss/cli with the same flags if you have npm)
  3. link the built stylesheet from your pages

Serve the scripts

You own serving and CSS building. Serve the vendored JS directory statically and load the barrel with one module script tag — no bundler required, any bundler welcome:

mux := http.NewServeMux()
mux.Handle("/assets/gsxui/",
	http.StripPrefix("/assets/gsxui/", http.FileServer(http.Dir("web/gsxui"))))

Build the CSS

Build the CSS entry with any Tailwind v4 tool. The standalone Tailwind CLI — a single binary from GitHub releases — is the natural fit; npm's @tailwindcss/cli takes the same flags. Then link the output from your pages:

# standalone Tailwind CLI — a single binary, no npm required:
# download for your platform from
# https://github.com/tailwindlabs/tailwindcss/releases/latest
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-macos-arm64
chmod +x tailwindcss-macos-arm64 && mv tailwindcss-macos-arm64 tailwindcss

./tailwindcss -i web/gsxui/index.css -o dist/gsxui.css

# already have npm? the npm-packaged CLI takes the same flags:
npx @tailwindcss/cli -i web/gsxui/index.css -o dist/gsxui.css