webextensions-examples is a collection of example Firefox add-ons that demonstrate the WebExtensions API.
The repository addresses the need for practical, working examples when learning to build browser extensions. WebExtensions are programs installed in a browser that modify browser behavior or web page functionality. The examples show how to use the WebExtensions APIs in complete, installable form, allowing developers to understand API usage patterns and use them as starting points for their own extensions. Each example is self-contained in a top-level folder with its own README explaining its functionality.
Developers new to WebExtensions should choose this collection to learn API patterns through concrete examples rather than documentation alone. The examples work with Firefox and, in most cases, are compatible with Chrome, Opera, and Edge due to the cross-browser nature of the WebExtensions API. Some examples target specific domains or pages, and a few require pre-release Firefox versions for newer APIs, with minimum version requirements declared in each extension's manifest. Installation is straightforward using either Firefox's about:debugging page or the web-ext command-line tool, which also provides automatic reloading during development.
The project is maintained by Mozilla's Add-ons team. The repository includes automated testing via continuous integration. Examples are organized as independent, installable extensions that developers can run immediately in Firefox without modification.