OOUI/Elements/Flagged

The  class is an attribute mixin, meaning that it is used to add additional functionality to an element created by another class. The class provides a  property assigned the name (or an array of names) of styling flags, which customize the look and feel of a widget to better describe its importance and functionality.

When an element is configured with a  property, its CSS styling is updated. A widget that is configured to be ‘destructive’, for example, will be styled with the ‘oo-ui-flaggedElement-destructive’ CSS class.

The library currently contains the following styling flags for general use:
 * :  Progressive styling is applied to convey that the widget will move the user forward in whatever process they are in.
 * : Destructive styling is applied to convey that the widget will remove something.
 * (deprecated in default theme): Constructive styling is applied to convey that the widget will create something. Constructive flag got deprecated in the default theme of OOjs UI v0.16.1.

Please see Buttons and Switches for an example of these flags.

Actions, which are a special kind of button used in process dialogs, use these flags:
 * : The primary action (e.g., ‘save’ or ‘done’) moves the user forward in whatever process they are in. The primary action is the most important widget in the user interface, and its positioning –in the upper right corner of the dialog window– reflects this.
 * : The safe action (e.g., ‘Cancel’) will make no changes. ‘Safe’ actions are usually configured without an action. Actions widgets that have no configured action will close the window without making changes.

Please see the documentation on action sets for more information about how the primary and safe flags are used.

For a full list of supported methods and configuration options provided by the  class, please see the code-level documentation.