Skip to content

Nuxt

A client-only plugin starts the widget once for the whole app.

On this page

Install

npm install open-accessibility-widget

Usage

plugins/accessibility.client.ts
import { init } from "open-accessibility-widget";

// ".client" in the file name: Nuxt runs the plugin in the browser only.
export default defineNuxtPlugin(() => {
  init({ position: "right" });
});

Notes

  • The .client suffix keeps the plugin out of server rendering.
  • The widget keeps its state across route changes.

Accessibility statement

Pass statementUrl to link your accessibility statement from the panel's footer.

Edit this page on GitHub