Installation

Use -axxy- from its source tree. This checkout's package.json is marked private: true at version 0.0.0; these instructions do not depend on a published npm package or CDN build.

Run the project locally

Use Node.js 20.19 or newer within the 20.x line, or Node.js 22.12 or newer, with npm. These are the versions accepted by the project's engines field.

If you already have the source, open its directory. Otherwise, replace <repository-url> below with the URL of your -axxy- repository.

git clone <repository-url> axxy
cd axxy
npm ci
npm run demos:generate
npm run dev

Open the local URL printed by Vite. npm ci installs the development tools from the lockfile; the browser library itself has no runtime package dependencies.

Use -axxy- in another site

Copy the complete axxy/ directory into your site's served files, keeping its relative paths intact. For the following example, place it at /vendor/axxy/. Load the full entry module once:

<axxy-scope>
  <button type="button" aria-pressed="false">Mute</button>
</axxy-scope>
<script type="module" src="/vendor/axxy/index.js"></script>

Serve the page over HTTP or HTTPS with JavaScript module files available at that URL. A local file: page is unsuitable for this module workflow. If your application already uses a bundler, import the entry module from your copied source directory instead. See MDN's module guide for browser loading requirements.

Load only the behaviors you need

Import the component modules before the wrapper module so their registry entries exist when scanning starts. For example, a page using only toggles can load:

<script type="module">
  import '/vendor/axxy/components/buttons/toggle.js';
  import '/vendor/axxy/axxy.js';
</script>

The toggle module imports its own shared dependencies. The full axxy/index.js entry already registers every bundled component, so choose either approach. Add your own styles, including visible focus and selected-state indicators.

Build and preview this documentation site

npm run build
npm run preview

The build regenerates the static documentation and example pages before Vite writes the site to dist/. Continue with Usage for markup conventions, component APIs, and dynamic content.