Skip to content

Commit d269cbb

Browse files
jwmsftmevey
andauthored
Title bar guidance updates (#3137)
* Title bar design guidance updates * removed standard height and TODOs * added back standard title bar height * Update hub/apps/design/basics/titlebar-design.md Co-authored-by: Jim Walker <[email protected]> --------- Co-authored-by: Eve Mwangi <[email protected]> Co-authored-by: Eve <[email protected]>
1 parent 0fc7c6b commit d269cbb

File tree

1 file changed

+80
-11
lines changed

1 file changed

+80
-11
lines changed

hub/apps/design/basics/titlebar-design.md

Lines changed: 80 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,43 +16,112 @@ The title bar sits at the top of an app on the [base layer](../signature-experie
1616

1717
## Standard design
1818

19-
Design features of a standard title bar:
19+
This section describes the design recommendations and behaviors of the parts of a standard title bar.
2020

21-
- 32px height
22-
- 16px app icon
23-
- Caption style text (see [XAML type ramp](../style/xaml-theme-resources.md#the-xaml-type-ramp))
24-
- Caption controls (minimize, maximize, close)
21+
### Bar
22+
23+
**Design**
24+
25+
- The standard title bar has a height of 32px.
26+
- The title bar's default background is [Mica](../style/mica.md), however we recommend that title bars blend with the rest of the window if possible.
27+
- Title bars help users differentiate when a window is active and inactive. All title bar elements should be semi-transparent when the window is inactive.
28+
- The title bar colors should adjust when users switch to [high contrast themes](../accessibility/high-contrast-themes.md), or between [light and dark modes](../style/color.md).
29+
- For high contrast themes, apps should use the `SystemColors` class for determining proper UI element coloring to facilitate a superior high-contrast experience.
30+
31+
**Behavior**
32+
33+
- The title bar plays a vital role in repositioning and resizing a window. All empty space in the title bar or space taken up by non-interactive elements like the window title should be draggable.
34+
- A single-click/tap on any part of the title bar that does not have an interactive element should show the system window menu.
35+
- A double-click/tap should toggle between maximizing the window and restoring the window.
36+
37+
### Icon
38+
39+
**Design**
40+
41+
- The size of the window icon is 16px by 16px.
42+
- Place the icon 16px from the left-most border in LTR, or right-most border in RTL.
43+
- If the back button is present, place the window icon 16px to the right of the back button.
44+
- The window icon should be vertically centered in the title bar. For example, When the title bar height is 32px, the top and bottom margins are 8px.
45+
46+
**Behavior**
47+
48+
- A single-click/tap on the icon should show system window menu.
49+
- A double-click/tap should close the window.
50+
51+
### Title
52+
53+
**Design**
54+
55+
- Place the window title 16px from the window icon or back button.
56+
- If neither an icon nor back button are present, place the window title 16px from the left-most border in LTR, or right-most border in RTL.
57+
- The window title should use the Segoe UI Variable (if available) or Segoe UI font.
58+
- The window title should use _caption_ style text (see [XAML type ramp](../style/xaml-theme-resources.md#the-xaml-type-ramp)).
59+
- The window title can be truncated, and an ellipsis added if the window width is smaller than the length of the title bar elements. The icon and caption buttons (min, max and close) should always be fully visible.
60+
61+
**Behavior**
62+
63+
- A single-click/tap on the icon should show system window menu.
64+
- A double-click/tap should toggle between maximizing the window and restoring the window.
65+
- The window title and other textual elements in the title bar should respond to [text-scaling](../input/text-scaling.md). This might require that the title bar grows in height.
66+
67+
68+
### Caption controls (minimize, maximize, restore, close)
69+
70+
If you create your own caption buttons for your app, follow these guidelines to match the system caption buttons.
71+
72+
**Design**
73+
74+
- Use these [icons](../style/segoe-fluent-icons-font.md) for the buttons:
75+
- Minimize icon: E921 ChromeMinimize
76+
- Maximize icon: E922 ChromeMaximize
77+
- Restore icon: E923 ChromeRestore
78+
- Close icon: E8BB ChromeClose
79+
- The icons for the the maximize and restore buttons have rounded corners.
80+
- Caption buttons have full bleed backplates.
81+
- Caption buttons respond to _rest_, _on hover_, _on pressed_, _active_, and _inactive_ states.
2582

2683
## Additional design patterns
2784

2885
### Back button
2986

30-
If a backstack is present, the back button should be placed to the left of the app title or image/title combination.
87+
**Design**
88+
89+
The recommended back button icon is: [E830 ChromeBack](../style/segoe-fluent-icons-font.md)
90+
91+
- If a back button is present, it should be placed to the left of the app title or icon/title combination (in LTR).
92+
- The back button responds to _rest_, _on hover_, _on pressed_, _active_, and _inactive_ states.
93+
- The back button should be 16px by 16px and vertically centered in the title bar. The button should have a full bleed backplate.
94+
- The back button should be 16px from the left-most border in LTR, or right-most border in RTL, and 16px from the next element to the left or right of it.
95+
3196

3297
:::image type="content" source="images/titlebar/back-button.png" alt-text="An example of a back button in the title bar":::
3398

3499
### Search
35100

36-
If global search functionality is present, a searchbox should be added to the titlebar, centered to the window. Increase the size of the title bar to 48px when including a searchbox.
101+
**Design**
102+
103+
If global search functionality is present, a searchbox should be added to the title bar, centered to the window. Increase the size of the title bar to 48px when you include a searchbox.
37104

38105
:::image type="content" source="images/titlebar/search.png" alt-text="An example of a search box centered in the title bar":::
39106

40-
Searchbox in this area will need to be designed to be responsive to react to window size changes.
107+
The search box needs to be responsive to react to window size changes.
41108

42109
### People
43110

44111
If account representation is present, the person-picture control should be placed to the left of the caption controls.
45-
Increase the size of the title bar to 48px when including a person-picture.
112+
Increase the size of the title bar to 48px when you include a person-picture.
46113

47114
:::image type="content" source="images/titlebar/people.png" alt-text="An example of a person picture control in the title bar":::
48115

116+
49117
### Tabs
50118

51-
If using tabs as the main element of an app, use the titlebar space and keep caption controls anchored to the right.
119+
If you use tabs as the main element of your app, use the title bar space and keep caption controls anchored to the right.
52120

53121
:::image type="content" source="images/titlebar/tabs.png" alt-text="An example of a tab view with tabs in the titlebar area":::
54122

123+
55124
### Next steps
56125

57126
> [!div class="nextstepaction"]
58-
> [See the developer guidance for title bar](../../develop/title-bar.md)
127+
> [See the developer guidance for title bar](../../develop/title-bar.md)

0 commit comments

Comments
 (0)