# Command Palette

> A ⌘K palette in a real dialog: results filter as you type, matched letters are underlined and a highlight slides between them.

Navigation · command, search, keyboard, dialog · HTML, CSS, vanilla JS · no dependencies · updated 2026-10-16
Demo: https://kodza.dev/components/command-palette/

Takes the whole screen (or reacts to the page scroll): give it a page, not a small box.

## Files

The code below, served as files: byte for byte what the Kodza site copies (the CSS includes its theme guard).

- [`kodza-command-palette.css`](https://kodza.dev/registry/command-palette/kodza-command-palette.css) · 13.8 KB
- [`kodza-command-palette.js`](https://kodza.dev/registry/command-palette/kodza-command-palette.js) · 11.2 KB
- [`kodza-command-palette.html`](https://kodza.dev/registry/command-palette/kodza-command-palette.html) · 2.8 KB · the markup, to adapt and paste into your page

**Can you run shell commands? Download the CSS and the JS, don't retype them.** Retyping costs thousands of tokens and can drop or change lines of the CSS. Put the files where your stack expects them (Use it says where: change the `-o` paths):

```bash
curl -fsSL --create-dirs -o kodza/kodza-command-palette.css https://kodza.dev/registry/command-palette/kodza-command-palette.css
curl -fsSL --create-dirs -o kodza/kodza-command-palette.js https://kodza.dev/registry/command-palette/kodza-command-palette.js
```

Then load the files from your page as Use it shows, instead of pasting the content. The HTML is the part you adapt (text, links, modifiers): paste it from the Code section. Copy the CSS and the JS from the Code section only if you can't run commands, exactly as they are. (Windows PowerShell: `curl.exe`.)

## API

- Root: `.kodza-command`
- Variables (set them on the root element itself: it declares its own defaults):
  - `--kz-cmdk-bg: #ffffff`
  - `--kz-cmdk-fg: #0a0a0a`
  - `--kz-cmdk-muted: rgba(10, 10, 10, 0.58)`
  - `--kz-cmdk-border: rgba(10, 10, 10, 0.1)`
  - `--kz-cmdk-soft: rgba(10, 10, 10, 0.06)`
  - `--kz-cmdk-backdrop: rgba(10, 10, 10, 0.32)`
  - `--kz-cmdk-shadow: 0 30px 70px -24px rgba(10, 10, 10, 0.45)`
  - `--kz-cmdk-width: 560px`
  - `--kz-cmdk-top: 14vh`
  - `--kz-cmdk-duration: 0.28s`
  - `--kz-cmdk-ease: cubic-bezier(0.22, 1, 0.36, 1)`
  - `--kz-cmdk-mono: ui-monospace, "SF Mono", Menlo, monospace`
- Events: `kodza:command` (bubbling, from the root)
- Lifecycle: `kodza:init` / `kodza:destroy` on `document`, with `{ detail: { root } }` to target a container.

## Keyboard

What each key does, by where the focus is. Keep it working when you adapt the HTML: same elements, same classes.

- Anywhere:
  - `Cmd/Ctrl+K`: Opens it, or closes it when it's open
- In the search field (focus in `.kodza-command__input`):
  - `ArrowDown` / `ArrowUp`: Next or previous result, round and round
  - `Enter`: Picks the highlighted result and closes
- Anywhere, while it's open (while `.kodza-command__dialog[open]` is on the page):
  - `Escape`: Closes it, focus back on the button

## Dark mode

The values Kodza uses on a dark background (`#0a0a0a`). For a page that follows the system theme, add them after the component's CSS:

```css
@media (prefers-color-scheme: dark) {
  .kodza-command {
    --kz-cmdk-bg: #161616;
    --kz-cmdk-fg: #f2f2f0;
    --kz-cmdk-muted: rgba(242, 242, 240, 0.52);
    --kz-cmdk-border: rgba(255, 255, 255, 0.12);
    --kz-cmdk-soft: rgba(255, 255, 255, 0.08);
    --kz-cmdk-backdrop: rgba(0, 0, 0, 0.55);
    --kz-cmdk-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.9);
  }
}
```

A site with its own theme switch puts the same rules under its dark selector instead (`[data-theme="dark"] .kodza-command { … }`); a single dark section, under that section's class.

## Use it

### Plain HTML page

- CSS: `kodza/kodza-command-palette.css` next to the page (the Files commands as they are), linked in `<head>`: `<link rel="stylesheet" href="kodza/kodza-command-palette.css">`. Without a shell, paste it in a `<style>` in `<head>` instead. It only touches `kodza-` classes.
- HTML: where the component goes. Paste it as many times as you need: instances never interfere.
- JS: `kodza/kodza-command-palette.js`, loaded with `<script src="kodza/kodza-command-palette.js" defer></script>` in `<head>`. Without a shell, paste it in a `<script>` before `</body>` (or in `<head>`: it waits for the page). One copy per page, whatever the number of instances.
- Restyle with the `--kz-…` variables, set on the component's root element itself (the root declares its own defaults, so a value on an ancestor is ignored), and with the modifiers / attributes listed under API.
- Font: it takes the page's own. The Kodza look is Geist: `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap">`.
- Content added later (AJAX navigation, a SPA route, a builder preview): start it with `document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: container } }))`; before removing it, the same call with `'kodza:destroy'` stops it and puts the original markup back.

### Claude artifact (claude.ai)

- Paste the CSS in a `<style>` and the JS in a `<script>` at the end, in the artifact itself: it loads stylesheets only from Google Fonts and scripts only from a few CDNs, so no `<link>` or `<script src>` to Kodza.
- Writing the artifact file with a shell? Insert the downloaded files (Files) with a command instead of retyping them: a line `KODZA-CSS` alone inside the `<style>`, `KODZA-JS` inside the `<script>`, then `sed -e '/^KODZA-CSS$/{r kodza/kodza-command-palette.css' -e 'd' -e '}' -e '/^KODZA-JS$/{r kodza/kodza-command-palette.js' -e 'd' -e '}' page.html > artifact.html`.
- Font: load Geist from Google Fonts (allowed): `<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap">`.
- Dark mode: the viewer sets `data-theme="dark"` or `"light"` on `<html>`, or nothing when it follows the system. Write the Dark mode rules twice: inside `@media (prefers-color-scheme: dark)` with `:root:not([data-theme="light"])` in front of each selector, and with `:root[data-theme="dark"]` in front of each selector.
- Forms: there is nowhere to send them. Handle `submit` in your script with `event.preventDefault()` and show the result in the page.

### WordPress

- HTML: a **Custom HTML** block (or a pattern / template part). WordPress keeps this markup as it is only for users allowed to post unfiltered HTML (Administrators; Super Admins on multisite): for anyone else it strips tags such as `<svg>`, `<input>` or `<dialog>`, so add it from the theme (a pattern or template part) instead.
- This one is inline (it flows like a word): pasted alone, many themes leave it at the edge of the page (block themes, and classic ones like Twenty Twenty-One or Blocksy), so put the Custom HTML block inside a **Group** block to line it up with the text.
- CSS and JS: the downloaded files go in the theme, under `wp-content/themes/<your-theme>/kodza/` (the child theme if there is one), enqueued from its functions.php (or a code-snippets plugin):
  ```php
  add_action('wp_enqueue_scripts', function () {
    $dir = get_stylesheet_directory() . '/kodza/';
    $uri = get_stylesheet_directory_uri() . '/kodza/';
    wp_enqueue_style('kodza-command-palette', $uri . 'kodza-command-palette.css', [], filemtime($dir . 'kodza-command-palette.css'));
    wp_enqueue_script('kodza-command-palette', $uri . 'kodza-command-palette.js', [], filemtime($dir . 'kodza-command-palette.js'), true);
  });
  ```
  Scoped to `kodza-` classes, the CSS never touches the theme. One copy of the JS, whatever the number of blocks.
- No access to the theme files? The CSS can also go, as it is, in **Appearance → Customize → Additional CSS** (classic theme) or **Styles → Additional CSS** in the Site Editor (block theme).
- Theme with AJAX page transitions: fire `kodza:init` on the new content after each swap (and `kodza:destroy` on the old one).
- Performance plugin (WP Rocket, LiteSpeed Cache, Perfmatters…) with **Delay JavaScript execution** turned on: add `kodza` to the scripts it must not delay. Otherwise the component waits for the visitor's first scroll, tap or mouse move, and that first click can be lost.
- Colours: by default, match the theme's palette. After the component's CSS, point these variables at the theme's colours, on the component root, Kodza's value as the fallback:
  `.kodza-command { --kz-cmdk-fg: var(TEXT, #0a0a0a); --kz-cmdk-bg: var(BACKGROUND, #ffffff); }`
  TEXT, BACKGROUND and ACCENT (the colour the theme fills its own buttons with) are the theme's own colour variables — block themes (theme.json, like Twenty Twenty-Five): `--wp--preset--color--contrast`, `--wp--preset--color--base`, `--wp--preset--color--contrast` (they fill their buttons with it; their accent-1… colours are decorative); Astra: `--ast-global-color-2`, `--ast-global-color-4`, `--ast-global-color-0`; Kadence: `--global-palette3`, `--global-palette9`, `--global-palette1`; GeneratePress: `--contrast`, `--base-3`, `--accent`; Blocksy: `--theme-palette-color-4`, `--theme-palette-color-8`, `--theme-palette-color-1`. Use only these names, and only if the site really has them (the theme's CSS, or Styles → Colors): the `--wp--preset--color--black`, `--white`, `--vivid-…` that WordPress adds everywhere are not the theme's palette. Another theme, or one without these variables (Hello Elementor, OceanWP): leave the variables alone, it keeps Kodza's monochrome; same when the developer asks for monochrome or the Kodza look. Leave the translucent greys (`rgba(10, 10, 10, …)`) as they are: they suit any light background. On a dark palette, set the other variables from Dark mode too.
- WordPress turns straight quotes and `--` into typographic ones in the text of a Custom HTML block (not inside `<code>` or `<pre>`).

#### With Elementor

- HTML: an **HTML** widget (Elementor shows it to administrators only). It keeps the code exactly as pasted, straight quotes included.
- CSS and JS: as above. Elementor's Site Settings → Theme Style styles every button, field, link and image of the page, components included; the theme guard at the end of the CSS keeps the component's buttons, fields and link colours as they are.
- The Elementor editor redraws each widget after the page has loaded: without the script below, the component stays still in the editor preview (the published page works). Add it once per site, in the footer like the component's script (`kodza/elementor-editor.js`, or a code-snippets plugin):

```js
// Kodza in the Elementor editor: the editor redraws each HTML widget after the page has loaded.
// Start Kodza in what it draws, stop it in what it replaces or removes. Once per site.
window.addEventListener('elementor/frontend/init', () => {
  if (!elementorFrontend.isEditMode()) return;
  class KodzaWidget extends elementorModules.frontend.handlers.Base {
    onInit() {
      super.onInit();
      this.kodza = [...this.$element[0].children];
      document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: this.$element[0] } }));
    }
    onDestroy() {
      super.onDestroy();
      this.kodza.forEach((root) => document.dispatchEvent(new CustomEvent('kodza:destroy', { detail: { root } })));
    }
  }
  elementorFrontend.elementsHandler.attachHandler('html', KodzaWidget);
});
```

- No child theme: everything can go in the HTML widget instead, `<style>` with the CSS, the HTML, then `<script>` with the JS. It works on the page and in the editor without the script above.

### Shopify

- Files: `assets/kodza-command-palette.css` and `assets/kodza-command-palette.js` (the Files commands with `-o assets/…`).
- In the section: `{{ 'kodza-command-palette.css' | asset_url | stylesheet_tag }}` and `<script src="{{ 'kodza-command-palette.js' | asset_url }}" defer></script>`, then the HTML.
- The theme editor re-renders sections: restart them with
  `document.addEventListener('shopify:section:load', (e) => document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root: e.target } })));`
  and the same with `shopify:section:unload` → `kodza:destroy`.

### React / Next.js

- Files, side by side (e.g. in `components/kodza/`): `CommandPalette.tsx` (below), the CSS block under Code saved as `command-palette.css` and the JS block as `command-palette.js`, both as they are. The HTML block is already inside the component: skip it.
- Use it: `import { CommandPalette } from '@/components/kodza/CommandPalette';` then `<CommandPalette />`. Props: `vars` (the `--kz-…` variables listed under API, e.g. `vars={{ '--kz-cmdk-bg': … }}`), `onCommand` (the `kodza:command` event), `className`, `style` and the other props of its `<div>` (`onClick`, `aria-…`).
- Next.js App Router: it is a Client Component already (`'use client'`). Pages Router: Next.js takes global CSS only in `pages/_app`, so move the `import './command-palette.css'` line there.
- Safe under StrictMode, client-side navigation and prop changes: when a prop changes, the `key` gives React a fresh element, `kodza:destroy` stops the script on the old one and `kodza:init` starts it on the new one.

```tsx
'use client';
// Kodza — Command Palette, for React. From https://kodza.dev/components/command-palette/
// Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license
// Next to this file: command-palette.css and command-palette.js, the component's CSS and JS from Kodza, as they are.
// Yours to edit: the markup is plain JSX below.
// The script changes this markup once React has rendered it (it adds layers, splits text, moves
// nodes), so React must not patch it afterwards. When a prop changes, the key gives React a fresh
// element: kodza:destroy stops the script on the old one, kodza:init starts it on the new one.
import { useRef, useEffect, type ComponentPropsWithoutRef, type ComponentRef, type CSSProperties } from 'react';
import './command-palette.css';

export type CommandPaletteProps = Omit<ComponentPropsWithoutRef<'div'>, "children" | "vars" | "onCommand"> & {
  /** Settings, as CSS variables on the root */
  vars?: {
    /** default: #ffffff */
    "--kz-cmdk-bg"?: string | number;
    /** default: #0a0a0a */
    "--kz-cmdk-fg"?: string | number;
    /** default: rgba(10, 10, 10, 0.58) */
    "--kz-cmdk-muted"?: string | number;
    /** default: rgba(10, 10, 10, 0.1) */
    "--kz-cmdk-border"?: string | number;
    /** default: rgba(10, 10, 10, 0.06) */
    "--kz-cmdk-soft"?: string | number;
    /** default: rgba(10, 10, 10, 0.32) */
    "--kz-cmdk-backdrop"?: string | number;
    /** default: 0 30px 70px -24px rgba(10, 10, 10, 0.45) */
    "--kz-cmdk-shadow"?: string | number;
    /** default: 560px */
    "--kz-cmdk-width"?: string | number;
    /** default: 14vh */
    "--kz-cmdk-top"?: string | number;
    /** default: 0.28s */
    "--kz-cmdk-duration"?: string | number;
    /** default: cubic-bezier(0.22, 1, 0.36, 1) */
    "--kz-cmdk-ease"?: string | number;
    /** default: ui-monospace, "SF Mono", Menlo, monospace */
    "--kz-cmdk-mono"?: string | number;
  };
  /** "kodza:command", fired by the script (bubbles from the root) */
  onCommand?: (event: CustomEvent) => void;
  className?: string;
};

export function CommandPalette({ vars, onCommand, className, style, ...rest }: CommandPaletteProps) {
  const ref = useRef<ComponentRef<'div'>>(null);
  const classes = ["kodza-command", className].filter(Boolean).join(' ');
  // Everything the markup is made of: when it changes, React gets a fresh element (see the top)
  const key = JSON.stringify([classes, vars, style, rest]);

  // Starts the script on this element once React has rendered it, stops it when it goes
  useEffect(() => {
    const root = ref.current;
    let live = true;
    // @ts-ignore: a plain script, no types to find
    import('./command-palette.js').then(() => {
      if (live) document.dispatchEvent(new CustomEvent('kodza:init', { detail: { root } }));
    });
    return () => {
      live = false;
      document.dispatchEvent(new CustomEvent('kodza:destroy', { detail: { root } }));
    };
  }, [key]);

  useEffect(() => {
    const root = ref.current;
    if (!root || !onCommand) return;
    const listener = (event: Event) => onCommand(event as CustomEvent);
    root.addEventListener("kodza:command", listener);
    return () => root.removeEventListener("kodza:command", listener);
  }, [onCommand, key]);

  return (
    <div key={key} {...rest} className={classes} style={{ ...vars, ...style } as CSSProperties} ref={ref}>
      <button className="kodza-command__trigger" type="button" aria-haspopup="dialog">
        <svg className="kodza-command__icon" viewBox="0 0 16 16" aria-hidden="true">
          <circle cx="7" cy="7" r="4.5" fill="none" stroke="currentColor" strokeWidth="1.5" />
          <path d="m10.5 10.5 3 3" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
        </svg>
        {' '}
        <span className="kodza-command__placeholder">Search components</span>
        {' '}
        <kbd className="kodza-command__kbd kodza-command__shortcut">⌘K</kbd>
      </button>
      <dialog className="kodza-command__dialog" aria-label="Command palette">
        <div className="kodza-command__search">
          <svg className="kodza-command__icon" viewBox="0 0 16 16" aria-hidden="true">
            <circle cx="7" cy="7" r="4.5" fill="none" stroke="currentColor" strokeWidth="1.5" />
            <path d="m10.5 10.5 3 3" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
          </svg>
          {' '}
          <input className="kodza-command__input" type="text" placeholder="Type a command or search…" aria-label="Search commands" autoComplete="off" spellCheck="false" />
          {' '}
          <kbd className="kodza-command__kbd">esc</kbd>
        </div>
        <div className="kodza-command__body">
          <div className="kodza-command__list" role="listbox" aria-label="Results">
            <div className="kodza-command__group" role="group" aria-label="Components">
              <p className="kodza-command__heading" aria-hidden="true">Components</p>
              <div className="kodza-command__option" role="option">
                <span className="kodza-command__text">Fill Button</span>
              </div>
              <div className="kodza-command__option" role="option">
                <span className="kodza-command__text">Scramble Link</span>
              </div>
              <div className="kodza-command__option" role="option">
                <span className="kodza-command__text">Pricing Plans</span>
              </div>
              <div className="kodza-command__option" role="option">
                <span className="kodza-command__text">Sticky Cards</span>
              </div>
            </div>
            <div className="kodza-command__group" role="group" aria-label="Actions">
              <p className="kodza-command__heading" aria-hidden="true">Actions</p>
              <div className="kodza-command__option" role="option">
                <span className="kodza-command__text">Copy the code</span>
                <kbd className="kodza-command__kbd">⌘C</kbd>
              </div>
              <div className="kodza-command__option" role="option">
                <span className="kodza-command__text">Toggle dark mode</span>
              </div>
              <div className="kodza-command__option" role="option">
                <span className="kodza-command__text">Deploy on a Friday</span>
                <kbd className="kodza-command__kbd">brave</kbd>
              </div>
            </div>
          </div>
          <p className="kodza-command__empty" hidden>Nothing found. Not even a bug.</p>
        </div>
        <div className="kodza-command__footer" aria-hidden="true">
          <span><kbd className="kodza-command__kbd">↑</kbd><kbd className="kodza-command__kbd">↓</kbd> to move</span>
          {' '}
          <span><kbd className="kodza-command__kbd">↵</kbd> to pick</span>
        </div>
      </dialog>
    </div>
  );
}
```

## Code

```html
<div class="kodza-command">
  <button class="kodza-command__trigger" type="button" aria-haspopup="dialog">
    <svg class="kodza-command__icon" viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.5" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="m10.5 10.5 3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
    <span class="kodza-command__placeholder">Search components</span>
    <kbd class="kodza-command__kbd kodza-command__shortcut">⌘K</kbd>
  </button>
  <dialog class="kodza-command__dialog" aria-label="Command palette">
    <div class="kodza-command__search">
      <svg class="kodza-command__icon" viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.5" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="m10.5 10.5 3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
      <input class="kodza-command__input" type="text" placeholder="Type a command or search…" aria-label="Search commands" autocomplete="off" spellcheck="false">
      <kbd class="kodza-command__kbd">esc</kbd>
    </div>
    <div class="kodza-command__body">
      <div class="kodza-command__list" role="listbox" aria-label="Results">
        <div class="kodza-command__group" role="group" aria-label="Components">
          <p class="kodza-command__heading" aria-hidden="true">Components</p>
          <div class="kodza-command__option" role="option"><span class="kodza-command__text">Fill Button</span></div>
          <div class="kodza-command__option" role="option"><span class="kodza-command__text">Scramble Link</span></div>
          <div class="kodza-command__option" role="option"><span class="kodza-command__text">Pricing Plans</span></div>
          <div class="kodza-command__option" role="option"><span class="kodza-command__text">Sticky Cards</span></div>
        </div>
        <div class="kodza-command__group" role="group" aria-label="Actions">
          <p class="kodza-command__heading" aria-hidden="true">Actions</p>
          <div class="kodza-command__option" role="option"><span class="kodza-command__text">Copy the code</span><kbd class="kodza-command__kbd">⌘C</kbd></div>
          <div class="kodza-command__option" role="option"><span class="kodza-command__text">Toggle dark mode</span></div>
          <div class="kodza-command__option" role="option"><span class="kodza-command__text">Deploy on a Friday</span><kbd class="kodza-command__kbd">brave</kbd></div>
        </div>
      </div>
      <p class="kodza-command__empty" hidden>Nothing found. Not even a bug.</p>
    </div>
    <div class="kodza-command__footer" aria-hidden="true">
      <span><kbd class="kodza-command__kbd">↑</kbd><kbd class="kodza-command__kbd">↓</kbd> to move</span>
      <span><kbd class="kodza-command__kbd">↵</kbd> to pick</span>
    </div>
  </dialog>
</div>
```

```css
/* Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license */
/* Kodza — Command Palette
   A ⌘K (Ctrl K) search box in a modal dialog: results filter as you type, matched letters
   are underlined, groups with nothing left disappear, and a highlight slides between results.
   Arrow keys to move, Enter to pick, Escape or a click outside to leave.
   Everything is tuned with the --kz-cmdk-* variables. */
.kodza-command {
  --kz-cmdk-bg: #ffffff;
  --kz-cmdk-fg: #0a0a0a;
  --kz-cmdk-muted: rgba(10, 10, 10, 0.58);
  --kz-cmdk-border: rgba(10, 10, 10, 0.1);
  --kz-cmdk-soft: rgba(10, 10, 10, 0.06);
  --kz-cmdk-backdrop: rgba(10, 10, 10, 0.32);
  --kz-cmdk-shadow: 0 30px 70px -24px rgba(10, 10, 10, 0.45);
  --kz-cmdk-width: 560px;
  --kz-cmdk-top: 14vh;
  --kz-cmdk-duration: 0.28s;
  --kz-cmdk-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --kz-cmdk-mono: ui-monospace, "SF Mono", Menlo, monospace;

  display: inline-block;
  color: var(--kz-cmdk-fg);
}

.kodza-command__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 280px;
  max-width: 100%;
  height: 40px;
  padding: 0 8px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--kz-cmdk-bg);
  box-shadow: inset 0 0 0 1px var(--kz-cmdk-border);
  color: var(--kz-cmdk-muted);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, color 0.25s ease;
}

.kodza-command__trigger:hover {
  box-shadow: inset 0 0 0 1px var(--kz-cmdk-muted);
  color: var(--kz-cmdk-fg);
}

.kodza-command__trigger:focus-visible {
  outline: 2px solid var(--kz-cmdk-fg);
  outline-offset: 2px;
}

.kodza-command__placeholder {
  flex: 1;
  text-align: left;
}

.kodza-command__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.kodza-command__kbd {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--kz-cmdk-soft);
  color: var(--kz-cmdk-muted);
  font-family: var(--kz-cmdk-mono);
  font-size: 11px;
  line-height: 1;
}

/* The dialog: it drops in a little, over a fading backdrop */
.kodza-command__dialog {
  width: min(var(--kz-cmdk-width), calc(100% - 32px));
  max-width: none;
  max-height: none;
  margin: var(--kz-cmdk-top) auto auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background: var(--kz-cmdk-bg);
  box-shadow: 0 0 0 1px var(--kz-cmdk-border), var(--kz-cmdk-shadow);
  color: var(--kz-cmdk-fg);
  font: inherit;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: opacity var(--kz-cmdk-duration) ease, transform var(--kz-cmdk-duration) var(--kz-cmdk-ease);
}

.kodza-command__dialog::backdrop {
  background: transparent;
  transition: background-color var(--kz-cmdk-duration) ease;
}

.kodza-command__dialog.is-open {
  opacity: 1;
  transform: none;
}

.kodza-command__dialog.is-open::backdrop {
  background: var(--kz-cmdk-backdrop);
}

.kodza-command__search {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid var(--kz-cmdk-border);
  color: var(--kz-cmdk-muted);
}

.kodza-command__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--kz-cmdk-fg);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.kodza-command__input::placeholder {
  color: var(--kz-cmdk-muted);
}

/* The results area: its height follows the results instead of jumping */
.kodza-command__body {
  overflow: hidden;
}

.kodza-command__list {
  position: relative;
  max-height: min(340px, 50vh);
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.kodza-command__group[hidden] {
  display: none;
}

.kodza-command__heading {
  margin: 0;
  padding: 10px 12px 6px;
  font-family: var(--kz-cmdk-mono);
  font-size: 11px;
  color: var(--kz-cmdk-muted);
}

.kodza-command__highlight {
  position: absolute;
  top: 0;
  right: 6px;
  left: 6px;
  height: var(--kz-hl-h, 40px);
  border-radius: 10px;
  background: var(--kz-cmdk-soft);
  opacity: var(--kz-hl-on, 0);
  transform: translateY(var(--kz-hl-y, 0));
  pointer-events: none;
}

.kodza-command__dialog.is-open .kodza-command__highlight {
  transition: transform 0.2s var(--kz-cmdk-ease), opacity 0.15s ease;
}

.kodza-command__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.kodza-command__option[hidden] {
  display: none;
}

.kodza-command__text mark {
  background: none;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.kodza-command__empty {
  margin: 0;
  padding: 36px 20px 40px;
  color: var(--kz-cmdk-muted);
  font-size: 14px;
  text-align: center;
}

.kodza-command__empty:not([hidden]) {
  animation: kodza-command-in 0.35s var(--kz-cmdk-ease) both;
}

@keyframes kodza-command-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.kodza-command__footer {
  display: flex;
  gap: 18px;
  padding: 10px 16px;
  border-top: 1px solid var(--kz-cmdk-border);
  color: var(--kz-cmdk-muted);
  font-family: var(--kz-cmdk-mono);
  font-size: 11px;
}

.kodza-command__footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .kodza-command__trigger,
  .kodza-command__dialog,
  .kodza-command__dialog::backdrop,
  .kodza-command__dialog.is-open .kodza-command__highlight {
    transition-duration: 0.01ms !important;
  }

  .kodza-command__empty:not([hidden]) {
    animation: none;
  }
}

/* Theming example — on a dark background:
.dark-section .kodza-command {
  --kz-cmdk-bg: #161616;
  --kz-cmdk-fg: #f2f2f0;
  --kz-cmdk-muted: rgba(242, 242, 240, 0.52);
  --kz-cmdk-border: rgba(255, 255, 255, 0.12);
  --kz-cmdk-soft: rgba(255, 255, 255, 0.08);
  --kz-cmdk-backdrop: rgba(0, 0, 0, 0.55);
  --kz-cmdk-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.9);
}
*/

/* kodza-guard 93a236f619a2 — generated by Kodza, do not edit.
   Theme guard: keeps a site's own CSS (WordPress themes, Bootstrap, CSS resets…) off this
   component. :not(#_) is always true and weighs as much as an id, so these lines win over
   theme rules made of classes and tags. Customise the component through its --kz-* variables. */

/* What the browser gives, where the component sets it only in some states: at the lowest weight, so its own rules below put it back */

:where(.kodza-command__trigger):not(#_) {
  outline: revert;
  outline-offset: revert;
}

/* What the browser gives, on everything the component leaves to it */

.kodza-command:not(#_),
.kodza-command__placeholder:not(#_),
.kodza-command__search:not(#_),
.kodza-command__body:not(#_),
.kodza-command__list:not(#_),
.kodza-command__highlight:not(#_),
.kodza-command__group:not(#_),
.kodza-command__option:not(#_),
.kodza-command__text:not(#_),
.kodza-command__footer:not(#_),
.kodza-command__footer span:where(:not([class*="kodza-"])):not(#_) {
  box-sizing: revert;
}

.kodza-command__trigger:not(#_) {
  margin: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  appearance: revert;
  max-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  white-space: revert;
  min-height: revert;
}

.kodza-command__icon:not(#_) {
  border: revert;
  margin: revert;
  padding: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  color: revert;
  font-family: revert;
  font-size: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-command__kbd:not(#_) {
  border: revert;
  margin: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-weight: revert;
  font-style: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-command__dialog:not(#_) {
  outline: revert;
  text-decoration: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  outline-offset: revert;
  appearance: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-command__input:not(#_) {
  margin: revert;
  border-radius: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
  white-space: revert;
  min-height: revert;
}

.kodza-command__heading:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-align: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-command__empty:not(#_) {
  border: revert;
  border-radius: revert;
  outline: revert;
  text-decoration: revert;
  transition: revert;
  list-style: revert;
  box-sizing: revert;
  float: revert;
  position: revert;
  background-color: revert;
  background-image: revert;
  box-shadow: revert;
  outline-offset: revert;
  appearance: revert;
  max-width: revert;
  max-height: revert;
  font-family: revert;
  font-weight: revert;
  font-style: revert;
  line-height: revert;
  letter-spacing: revert;
  text-transform: revert;
  text-underline-offset: revert;
  text-indent: revert;
  text-shadow: revert;
  vertical-align: revert;
}

.kodza-command__icon:not(#_):where(:not([hidden])),
.kodza-command__dialog:not(#_):where(:not([hidden])),
.kodza-command__input:not(#_):where(:not([hidden])),
.kodza-command__heading:not(#_):where(:not([hidden])),
.kodza-command__empty:not(#_):where(:not([hidden])) {
  display: revert;
}

.kodza-command__icon:not(#_):where([hidden]),
.kodza-command__dialog:not(#_):where([hidden]),
.kodza-command__input:not(#_):where([hidden]),
.kodza-command__heading:not(#_):where([hidden]),
.kodza-command__empty:not(#_):where([hidden]) {
  display: none;
}

/* The component's own rules, one step stronger: real buttons and fields, what it sets on tags themes style (links, lists, headings, images…), and the root width (a theme may narrow it, never widen it) */

.kodza-command__trigger:not(#_) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 280px;
  max-width: 100%;
  height: 40px;
  padding: 0 8px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--kz-cmdk-bg);
  box-shadow: inset 0 0 0 1px var(--kz-cmdk-border);
  color: var(--kz-cmdk-muted);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, color 0.25s ease;
}

.kodza-command__trigger:hover:not(#_) {
  box-shadow: inset 0 0 0 1px var(--kz-cmdk-muted);
  color: var(--kz-cmdk-fg);
}

.kodza-command__trigger:focus-visible:not(#_) {
  outline: 2px solid var(--kz-cmdk-fg);
  outline-offset: 2px;
}

.kodza-command__kbd:not(#_) {
  display: inline-grid;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--kz-cmdk-soft);
  color: var(--kz-cmdk-muted);
  font-family: var(--kz-cmdk-mono);
  font-size: 11px;
  line-height: 1;
}

.kodza-command__dialog:not(#_) {
  max-width: none;
  max-height: none;
  margin: var(--kz-cmdk-top) auto auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--kz-cmdk-bg);
  box-shadow: 0 0 0 1px var(--kz-cmdk-border), var(--kz-cmdk-shadow);
  color: var(--kz-cmdk-fg);
  font: inherit;
  transition: opacity var(--kz-cmdk-duration) ease, transform var(--kz-cmdk-duration) var(--kz-cmdk-ease);
}

.kodza-command__input:not(#_) {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--kz-cmdk-fg);
  font: inherit;
  font-size: 16px;
  outline: none;
}

.kodza-command__input:not(#_)::placeholder {
  color: var(--kz-cmdk-muted);
}

.kodza-command__heading:not(#_) {
  margin: 0;
  padding: 10px 12px 6px;
  font-family: var(--kz-cmdk-mono);
  font-size: 11px;
  color: var(--kz-cmdk-muted);
}

.kodza-command__empty:not(#_) {
  margin: 0;
  padding: 36px 20px 40px;
  color: var(--kz-cmdk-muted);
  font-size: 14px;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .kodza-command__trigger:not(#_) {
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kodza-command__dialog:not(#_) {
    transition-duration: 0.01ms !important;
  }
}
```

```js
// Kodza License: free to use, client work included. Not to resell or redistribute, ported or not: https://kodza.dev/docs/#print-license
// Kodza — Command Palette
// Opens the dialog (button or ⌘K / Ctrl K, for the first palette of the page), filters the
// options as you type (letters in order, not necessarily side by side), keeps one option
// active for the arrow keys, and fires "kodza:command" with { value } when one is picked.
(() => {
  const SELECTOR = '.kodza-command';
  const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
  // The page behind stays put while it is open: a wheel or a swipe only scrolls what can
  // scroll inside, under the pointer. Listening only while open costs nothing the rest of the time.
  const holdPage = (layer, signal) => {
    const inside = (target, x, y, dy) => {
      for (let el = target; el instanceof Element && layer.contains(el); el = el.parentElement) {
        const box = el.getBoundingClientRect();
        if (x < box.left || x > box.right || y < box.top || y > box.bottom) continue;
        if (!/(auto|scroll)/.test(getComputedStyle(el).overflowY) || el.scrollHeight <= el.clientHeight + 1) continue;
        if (dy > 0 ? el.scrollTop + el.clientHeight < el.scrollHeight - 1 : el.scrollTop > 0) return true;
      }
      return false;
    };
    let last = 0;
    const wheel = (event) => !inside(event.target, event.clientX, event.clientY, event.deltaY) && event.preventDefault();
    const touchstart = (event) => (last = event.touches[0].clientY);
    const touchmove = (event) => {
      const touch = event.touches[0];
      const dy = last - touch.clientY;
      last = touch.clientY;
      if (!inside(event.target, touch.clientX, touch.clientY, dy)) event.preventDefault();
    };
    const hold = (on) => {
      const method = on ? 'addEventListener' : 'removeEventListener';
      document[method]('wheel', wheel, { passive: false });
      document[method]('touchstart', touchstart, { passive: true });
      document[method]('touchmove', touchmove, { passive: false });
    };
    const observer = new MutationObserver(() => hold(layer.open));
    observer.observe(layer, { attributes: true, attributeFilter: ['open'] });
    // Stopped while open: the page is let go
    signal.addEventListener('abort', () => {
      observer.disconnect();
      hold(false);
    });
  };

  const isMac = /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
  let uid = 0;
  let shortcutTaken = false;

  // The positions of the query's letters in the text, in order, or null
  const match = (text, query) => {
    const hits = [];
    let from = 0;
    for (const char of query) {
      const at = text.indexOf(char, from);
      if (at < 0) return null;
      hits.push(at);
      from = at + 1;
    }
    return hits;
  };

  // One instance. Everything it starts is tied to `signal`, so kodza:destroy stops it all
  function mount(root, signal) {
    const trigger = root.querySelector('.kodza-command__trigger');
    const dialog = root.querySelector('.kodza-command__dialog');
    holdPage(dialog, signal);
    const input = root.querySelector('.kodza-command__input');
    const list = root.querySelector('.kodza-command__list');
    const empty = root.querySelector('.kodza-command__empty');
    if (!trigger || !dialog || !input || !list) return;
    const groups = [...list.querySelectorAll('.kodza-command__group')];
    const options = [...list.querySelectorAll('.kodza-command__option')];
    const labels = new Map(options.map((option) => [option, option.querySelector('.kodza-command__text') || option]));
    const texts = new Map(options.map((option) => [option, labels.get(option).textContent]));
    const duration = reduceMotion ? 0 : parseFloat(getComputedStyle(root).getPropertyValue('--kz-cmdk-duration')) * 1000 || 280;

    // ids for the combobox wiring, made here so the copied HTML has none
    const prefix = `kodza-command-${++uid}`;
    list.id = `${prefix}-list`;
    options.forEach((option, i) => (option.id = `${prefix}-option-${i}`));
    input.setAttribute('role', 'combobox');
    input.setAttribute('aria-expanded', 'true');
    input.setAttribute('aria-controls', list.id);
    input.setAttribute('aria-autocomplete', 'list');

    if (!isMac) root.querySelectorAll('.kodza-command__shortcut').forEach((kbd) => (kbd.textContent = 'Ctrl K'));

    const highlight = document.createElement('span');
    highlight.className = 'kodza-command__highlight';
    highlight.setAttribute('aria-hidden', 'true');
    list.prepend(highlight);

    let active = null;
    const visible = () => options.filter((option) => !option.hidden);

    const activate = (option, scroll = true) => {
      options.forEach((other) => other.setAttribute('aria-selected', String(other === option)));
      active = option;
      if (!option) {
        input.removeAttribute('aria-activedescendant');
        list.style.setProperty('--kz-hl-on', 0);
        return;
      }
      input.setAttribute('aria-activedescendant', option.id);
      list.style.setProperty('--kz-hl-y', `${option.offsetTop}px`);
      list.style.setProperty('--kz-hl-h', `${option.offsetHeight}px`);
      list.style.setProperty('--kz-hl-on', 1);
      if (scroll) option.scrollIntoView({ block: 'nearest' });
    };

    const body = root.querySelector('.kodza-command__body');
    let resize = null;
    const filter = (animate = false) => {
      const from = body && animate ? body.offsetHeight : 0;
      const query = input.value.trim().toLowerCase();
      options.forEach((option) => {
        const text = texts.get(option);
        const hits = query ? match(text.toLowerCase(), query) : [];
        option.hidden = hits === null;
        // Underline the matched letters
        const label = labels.get(option);
        if (!hits || !hits.length) {
          label.textContent = text;
          return;
        }
        const parts = [];
        let last = 0;
        hits.forEach((at) => {
          if (at > last) parts.push(text.slice(last, at));
          const mark = document.createElement('mark');
          mark.textContent = text[at];
          parts.push(mark);
          last = at + 1;
        });
        parts.push(text.slice(last));
        label.replaceChildren(...parts);
      });
      groups.forEach((group) => (group.hidden = !group.querySelector('.kodza-command__option:not([hidden])')));
      const shown = visible();
      if (empty) empty.hidden = shown.length > 0;
      list.hidden = !shown.length;
      activate(shown[0] || null);
      // The box grows or shrinks to the new results instead of jumping
      if (body && animate && !reduceMotion) {
        resize?.cancel();
        const to = body.offsetHeight;
        if (Math.abs(to - from) > 1) resize = body.animate([{ height: `${from}px` }, { height: `${to}px` }], { duration: 240, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' });
      }
    };

    let closing = 0;
    const open = () => {
      // Reopened while it was closing: it simply comes back
      if (dialog.open) {
        clearTimeout(closing);
        dialog.classList.add('is-open');
        input.focus();
        return;
      }
      input.value = '';
      filter();
      dialog.showModal();
      requestAnimationFrame(() => {
        dialog.classList.add('is-open');
        activate(visible()[0] || null, false);
      });
      input.focus();
    };

    const close = () => {
      if (!dialog.open || !dialog.classList.contains('is-open')) return;
      dialog.classList.remove('is-open');
      clearTimeout(closing);
      closing = setTimeout(() => {
        dialog.close();
        trigger.focus({ preventScroll: true });
      }, duration);
    };

    const pick = (option) => {
      if (!option) return;
      root.dispatchEvent(new CustomEvent('kodza:command', { detail: { value: texts.get(option) }, bubbles: true }));
      close();
    };

    trigger.addEventListener('click', open, { signal });
    input.addEventListener('input', () => filter(true), { signal });
    input.addEventListener('keydown', (event) => {
      const shown = visible();
      const index = shown.indexOf(active);
      if (event.key === 'ArrowDown' || event.key === 'ArrowUp') {
        event.preventDefault();
        if (shown.length) activate(shown[(index + (event.key === 'ArrowDown' ? 1 : -1) + shown.length) % shown.length]);
      } else if (event.key === 'Enter') {
        event.preventDefault();
        pick(active);
      }
    }, { signal });
    options.forEach((option) => {
      option.addEventListener('pointermove', () => active !== option && activate(option, false), { signal });
      option.addEventListener('click', () => pick(option), { signal });
    });

    // Escape and clicks on the backdrop close it, with the animation
    dialog.addEventListener('cancel', (event) => {
      event.preventDefault();
      close();
    }, { signal });
    dialog.addEventListener('click', (event) => {
      const box = dialog.getBoundingClientRect();
      const inside = event.clientX >= box.left && event.clientX <= box.right && event.clientY >= box.top && event.clientY <= box.bottom;
      if (!inside) close();
    }, { signal });

    if (!shortcutTaken) {
      shortcutTaken = true;
      document.addEventListener('keydown', (event) => {
        if (event.key.toLowerCase() === 'k' && (event.metaKey || event.ctrlKey)) {
          event.preventDefault();
          dialog.open ? close() : open();
        }
      }, { signal });
      // Stopped, it hands the shortcut to the next palette started
      signal.addEventListener('abort', () => (shortcutTaken = false));
    }

    // Stopped while open: the page is released at once
    signal.addEventListener('abort', () => {
      clearTimeout(closing);
      if (dialog.open) dialog.close();
    });
  }

  // Kodza lifecycle, the same in every component: `kodza:init` starts the instances inside
  // event.detail.root (the whole page by default), `kodza:destroy` stops them and puts their
  // markup back. For themes and apps that swap content without a page load.
  const instances = new WeakMap();
  const find = (scope = document) => [scope, ...scope.querySelectorAll(SELECTOR)].filter((el) => el.matches?.(SELECTOR));
  const init = (scope) => find(scope).forEach((root) => {
    if (root.classList.contains('is-ready')) return; // already running, maybe from another copy of this script
    const controller = new AbortController();
    instances.set(root, { controller, html: root.innerHTML, attrs: [...root.attributes].map((a) => [a.name, a.value]) });
    mount(root, controller.signal);
    root.classList.add('is-ready');
  });
  const destroy = (scope) => find(scope).forEach((root) => {
    const instance = instances.get(root);
    if (!instance) return;
    instances.delete(root);
    instance.controller.abort();
    [...root.attributes].forEach((a) => root.removeAttribute(a.name));
    instance.attrs.forEach(([name, value]) => root.setAttribute(name, value));
    root.innerHTML = instance.html;
  });
  document.addEventListener('kodza:init', (event) => init(event.detail?.root));
  document.addEventListener('kodza:destroy', (event) => destroy(event.detail?.root));
  init();
  // Loaded in <head>, the script runs before the markup exists: once more when it is parsed
  if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => init(), { once: true });
})();
```

Free to use, from Kodza (https://kodza.dev).
