Skip to content

Vue

Start it in onMounted and remove it in onBeforeUnmount.

On this page

Install

npm install open-accessibility-widget

Usage

App.vue
<script setup>
import { onMounted, onBeforeUnmount } from "vue";
import { init } from "open-accessibility-widget";

let widget;
onMounted(() => (widget = init({ position: "right" })));
onBeforeUnmount(() => widget?.destroy());
</script>

Notes

  • Call init() in your root component, so it runs once for the whole app.
  • With Nuxt, use a client-only plugin instead (see Nuxt).

Accessibility statement

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

Edit this page on GitHub