How to install the accessibility widget in React
Integrating the Accessibility Widget into React projects. The following instructions describe installation, configuration, and basic use. A detailed description of the methods can be found in the base package documentation.
1. Installing the package
Using NPM:
or Yarn:
2. Basic use
To use a widget in React, wrap your app in the <AccessibilityProvider> component. Then use the useAccessibility() hook to access the widget instance and its status.
Hook use Accessibility() returns two key elements:
3. Base package documentation
All widget methods, events, configuration and API are available in the main package documentation: 👉 @dockcodes/accessibility-widget (opens in a new tab)
🔑 Get a free token
The widget requires a token that you generate for free in the panel: 👉 https://wcag.dock.codes/my-account/tokens/ (opens in a new tab)
🤝 Contributing
Contributions are welcome! If you find a bug or want to improve the library, please open an issue or pull request on: 👉 GitHub (opens in a new tab)
Related posts
- How to install the accessibility widget in Joomla
- Accessibility widget script
- How to install the accessibility widget in MODX
- How to install the accessibility widget in Prestashop
- How to install the accessibility widget in WordPress
Still looking for answers?
Ask our experts using online chat