OOUI/Using OOUI in MediaWiki

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

(implemented by class ) ensures that the proper theme and directionality is configured, and that the page loads the OOjs UI styles. The OOjs UI widgets are namespaced, so they must be prefixed with. Stringifying the widgets converts them to HTML, so you can add widgets to the page using.

From JavaScript code, you just need to list the  module as a dependency of your modules that use OOjs UI. For example:

See 187079 for some more ideas.