MCPcopy Index your code
hub / github.com/codepilotsf/zjax

github.com/codepilotsf/zjax @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
82 symbols 197 edges 27 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Zjax

Zjax is a lightweight yet powerful JavaScript library (4.9K gzipped) that brings modern SPA-like interactivity to your web pages with minimal effort. By simply adding z-swap and z-action attributes to your HTML elements, you can dynamically update parts of a web page or bind client-side JavaScript actions directly to the DOM — all without writing any verbose JavaScript code.

Inspired by HTMX, Hotwire, and AlpineJS and compatible with any SSR backend like Rails, Laravel, Django, Astro – or even Wordpress, Zjax seamlessly integrates into your workflow.

Getting started

Just include the Zjax CDN link in your document head.

<head>
  <script src="https://unpkg.com/zjax@3.0.4"></script>
  ...
</head>

You can now use Zjax attributes anywhere in your project.

z-swap example

<button z-swap="@click /about-us #content">Go</button>





When clicked, this button will fetch /about-us and replace the local #content element with the #content element found in the response.

z-action example

<button z-action="@click $('#menu').addClass('active')">Go</button>


...


Clicking this button will simply add the CSS class active to the #menu element.


Full Documentation: https://zjax.dev/docs


Core symbols most depended-on inside this repo

withHtml
called by 19
test/base.js
debug
called by 11
src/lib/debug.js
updateAttributes
called by 6
src/lib/swaps.js
confirm
called by 4
script/semver.cjs
parseActions
called by 4
src/lib/actions.js
parseSwaps
called by 4
src/lib/swaps.js
red
called by 3
script/cover-diff.mjs
expectDialogAfter
called by 3
test/base.js

Shape

Function 78
Class 2
Method 2

Languages

TypeScript100%

Modules by API surface

src/lib/swaps.js18 symbols
script/semver.cjs12 symbols
test/base.js9 symbols
test/zswap.spec.js7 symbols
src/lib/modifiers.js7 symbols
src/lib/actions.js4 symbols
test/zswap-methods.spec.js3 symbols
src/lib/utils.js3 symbols
src/lib/listeners.js3 symbols
src/lib/dollar.js3 symbols
src/ui.js2 symbols
src/lib/triggers.js2 symbols

For agents

$ claude mcp add zjax \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact