@@ -20,33 +20,37 @@ thoughtfully and sparingly.
20
20
21
21
## Options
22
22
23
- ### Title
24
-
25
- All dialogs must have a title. Titles appear in bold at the top of the dialog and use a few words to convey the outcome
26
- of what will happen if a user continues with an action.
23
+ < Guideline title = " Title" image = " modal-options-title.svg " >
24
+ All modals must have a title. Titles appear in bold at the top of the dialog and use a few words to convey the outcome
25
+ of what will happen if a user continues with an action.
26
+ </ Guideline >
27
27
28
28
## Behaviors
29
29
30
+ <Guideline title = " Behaviors" image = " modal-behaviors.svg" >
30
31
Modals should:
31
32
32
33
- Require that the user take an action.
33
34
- Close when the user presses the ` X ` button, the ` Cancel ` button, the ` Esc ` key, or when they complete the main action.
34
35
- Make all content behind the overlay become inactive.
36
+
37
+ </Guideline >
35
38
36
39
## Usage guidelines
37
40
38
- ### Keep it simple
39
-
40
- Use modals when merchants must complete an action before they can continue with the main workflow. Avoid using modals to
41
+ <Guideline title = " Keep it simple" image = " modal-usage-guidelines-1-do.svg" good >
42
+ Use modals when merchants must complete an action before they can continue with the main workflow. Avoid using modals to
41
43
display complex forms or large amounts of information.
44
+ </Guideline >
42
45
43
- ### Two buttons only
44
-
46
+ <Guideline title = " Two buttons only" image = " modal-usage-guidelines-2-do.svg" good >
45
47
Don't use more than two buttons (primary and secondary) at the bottom. This prevents unclear action hierarchy and
46
48
crowding on mobile screens. Since modals are for focused tasks, they should have focused actions. In some cases however,
47
49
a tertiary action may be appropriate.
50
+ </Guideline >
51
+ <Guideline image = " modal-usage-guidelines-2-dont.svg" bad ></Guideline >
48
52
49
- ### Button layout
50
-
53
+ <Guideline title = " Button layout" image = " modal-usage-guidelines-3-do.svg" good >
51
54
The cancel action should always be to the left, while the main action is to the right. Buttons are placed at the bottom
52
55
of the box.
56
+ </Guideline >
0 commit comments