variant property

OptimusButtonVariant variant
final

The variant of the button.

  • OptimusButtonVariant.primary: Primary buttons should only appear once per screen (not including the App bar, modal dialog, or side panel).
  • OptimusButtonVariant.secondary: For secondary actions on each page. Secondary buttons can only be used in conjunction with a primary button. Do not use a secondary button in isolation and do not use a secondary button for a positive action.
  • OptimusButtonVariant.tertiary: For less prominent, and sometimes independent, actions. Tertiary buttons can be used in isolation or paired with a primary button when there are multiple calls to action. Tertiary buttons can also be used for sub-tasks on a page where a primary button for the main and final action is present.
  • OptimusButtonVariant.ghost: For the least pronounced actions; often used in conjunction with a primary button. In a situation such as a progress flow, a ghost button may be paired with a primary and secondary button set, where the primary button is for forward action, the secondary button is for “Back”, and the ghost button is for “Cancel”. OptimusButtonVariant.danger: For actions that could have destructive effects on the user’s data (for example, delete or remove).

Implementation

final OptimusButtonVariant variant;