You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: website/docs/patterns/button-organization/partials/guidelines/alignment.md
+13-12
Original file line number
Diff line number
Diff line change
@@ -6,41 +6,42 @@ Alignment refers to how buttons and actions are aligned relative to the containe
6
6
7
7
When considering internationalization (i18n), **start** and **end** are suitable substitutes for **left** and **right** alignment to account for languages that are read right-to-left ([RTL](https://developer.mozilla.org/en-US/docs/Glossary/RTL)).
Actions are aligned to the left of the container or page. A common example of this alignment method is in [Modals](/components/modal) and page-level forms.
14
+
In most scenarios, align buttons to the **left side**of a container or page. The primary button should be leftmost, followed by secondary, then tertiary.
- This reinforces natural reading patterns and a conversational "dialog-like" messaging strategy.
17
+
- When combined with a consistent ordering method, the primary button is prioritized in the reading direction.
18
+
- When considering different contexts, opting for a single method helps to create consistency between constrained and unconstrained components and patterns.
19
+
20
+
A common example of this alignment method is in [Modals](/components/modal) and page-level forms.
17
21
18
22
!!! Do
19
23
20
-
In most scenarios, align buttons to the **left side** of a container or page.
24
+
Align buttons to the left side of the container.
21
25
22
-
- This reinforces natural reading patterns and a conversational "dialog-like" messaging strategy.
23
-
- When combined with a consistent ordering method, the primary button is prioritized in the reading direction.
24
-
- When considering different contexts, opting for a single method helps to create consistency between constrained and unconstrained components and patterns.
26
+

Actions are aligned to the right of the container or page. This alignment method is commonly used for page-level functions or actions that create and manage elements within a page.
32
+
In the case of page-level functions or actions that manage elements within the page, align buttons to the right of the page. The primary button should be the farthest right, then secondary, then tertiary.

34
35
35
36
### Center alignment
36
37
37
-
Actions are aligned in the middle of the container or page. This alignment method is _not_ recommended in the majority of scenarios.
38
+
This alignment method is _not_ recommended in the majority of scenarios.
38
39
39
40
- Can cause buttons to needlessly fill the horizontal space of the container
40
41
- Can cause buttons to appear detached from the content they are paired with, especially if a user has increased zoom settings within their browser
Copy file name to clipboardexpand all lines: website/docs/patterns/button-organization/partials/guidelines/grouping.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
How actions are grouped can influence what the user perceives as the primary action. Actions grouped correctly can alleviate decision fatigue and help users better understand the outcome of their actions.
4
4
5
-
- Group buttons together that perform similar, related, and inverse functions. This generally refers to functions like "yes/no" or "ok/cancel."
5
+
- Group buttons together that perform similar, related, and inverse functions. This generally refers to functions like "yes/no" or "ok/cancel".
6
6
- Inverse grouping generally helps users to make decisions quicker as their options are limited.
7
7
- As a best practice, tertiary actions should only be used if they help the user make a decision (linking to a different area of the application or documentation).
8
8
- Presenting the user with more than one action in this context can be confusing and force the user to question whether they are making the correct decision. Read more about [Hick's Law](https://www.interaction-design.org/literature/article/hick-s-law-making-the-choice-easier-for-users).
Copy file name to clipboardexpand all lines: website/docs/patterns/button-organization/partials/guidelines/order.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ User edits the settings of a cluster:
58
58
59
59
A possible exception to this ordering method is in multi-step and progressive flows in which buttons fulfill both a functional purpose (create or edit something) and a navigational purpose (proceed, go back).
60
60
61
-
- The **directionality** and positive outcome of the overall flow are reinforced by the button order and grouping
61
+
- The **directionality** and positive outcome of the overall flow are reinforced by the button order and grouping.
62
62
- In a multi-step flow, this type of pattern would persist on the page; the repetitiveness acts as a form of consistency scoped to the feature the pattern is used in.
@@ -69,7 +69,7 @@ As the viewport size shrinks, buttons should stack vertically in accordance with
69
69
70
70
- This naturally adheres to our ordering guidelines; button order remains the same, except the container is vertical rather than horizontal.
71
71
- This reduces complexity in engineering.
72
-
- This ensures our applications meet accessibility conformance in [making the DOM order match the visual order](https://www.w3.org/TR/WCAG20-TECHS/C27.html)
72
+
- This ensures our applications meet accessibility conformance in [making the DOM order match the visual order](https://www.w3.org/TR/WCAG20-TECHS/C27.html).
0 commit comments