OOUI/Using OOUI in MediaWiki

Since OOjs-ui is now in core, to use OOjs-ui from PHP extension code requires code similar to:

The  call ensures that the proper theme and directionality is configured, and that the OOjs-ui styles are loaded. The OOjs-ui widgets are namespaced, so they must be prefixed with. Stringifying the widgets converts them to HTML, so your widgets can be added to the page using.

From JavaScript code, you just need to ensure that the  module is included in the dependencies. For example:

See https://gerrit.wikimedia.org/r/187079 for some more ideas.