Skip to content

Commit 7c09b7c

Browse files
docs(drawer): Updates design guidelines for v6. (#4626)
* docs(drawer): Updates design guidelines for accuracy. * Updates content to discuss new images. * Updates overlay image. --------- Co-authored-by: Andrew Ronaldson <aronalds@redhat.com>
1 parent c268f0f commit 7c09b7c

7 files changed

Lines changed: 1369 additions & 2 deletions

File tree

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drawer/drawer.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,57 @@ import '../components.css';
99

1010
Drawers can be used to store and show more information than immediately presented on a page. A drawer with more information is usually prompted by a user click. Upon the click, the drawer comes out and shows more information, which is usually relevant to a whole page.
1111

12-
Drawers appear as a sliding panel that can be attached to the bottom or right edge of a window. They’re commonly used in a [primary-detail](/patterns/primary-detail), which is a layout that uses a drawer for details and spans the height of the primary content. The primary content can be placed in any container, and the details drawer will span the height of that container. The drawer component is used for the details because it's common for the "detail" in primary-detail to be toggled open/close, while the primary content should always be present on the screen. For a primary-detail in a card, the details section is still built with a drawer component even when it's not collapsible.
12+
Drawers appear as a sliding panel that can be attached to the bottom or sides of a window. They’re commonly used in a [primary-detail](/patterns/primary-detail), which is a layout that uses a drawer for details and spans the height of the primary content. The primary content can be placed in any container, and the details drawer will span the height of that container. The drawer component is used for the details because it's common for the "detail" in primary-detail to be toggled open/close, while the primary content should always be present on the screen. For a primary-detail in a card, the details section is still built with a drawer component even when it's not collapsible.
1313

1414
In addition to primary-details, the drawer component is frequently used in [notification drawers](/components/notification-drawer) or terminal windows.
1515

1616
### Splitter in a drawer
1717

18-
A **splitter** allows you to create a layout with resizable panes. The orientation of a splitter can be set to **vertical** or **horizontal**.
18+
A splitter allows you to create a layout with resizable panes. The orientation of a splitter can be set to vertical or horizontal.
1919

2020
### When to use a splitter
2121
Add a splitter to a drawer if you need to resize the width or height of a panel to give content more space. If data shown in a drawer has enough space, then you don’t need to use a splitter.
2222

2323
<div class="ws-docs-content-img">
2424
![Example of a drawer with a splitter.](./img/drawer-splitter.svg)
2525
</div>
26+
27+
## Variations
28+
29+
There are 2 types of drawer displays: overlay and inline.
30+
31+
### Overlay drawer
32+
33+
An overlay drawer appears "on top" of page content, and must be minimized or closed in order for users to view the content that is covered by the expanded drawer.
34+
35+
<div class="ws-docs-content-img">
36+
![A drawer overlays page content, displaying a shadow where the primary page content is overlaid.](./img/drawer-overlay.svg)
37+
</div>
38+
39+
### Inline drawer
40+
41+
An inline drawer is placed beside page content, making the rest of the page content more compact (but still visible).
42+
43+
<div class="ws-docs-content-img">
44+
![A drawer is beside page content, similar to a split screen view.](./img/drawer-inline.svg)
45+
</div>
46+
47+
## Placement
48+
49+
By default, a drawer is placed on the right side of the UI. Depending on your user case, you can adjust this so that the drawer is on the left or at the bottom of the page instead.
50+
51+
### Right (default)
52+
<div class="ws-docs-content-img">
53+
![A drawer is placed on the right side of a page.](./img/drawer-placement-right.svg)
54+
</div>
55+
56+
### Left
57+
<div class="ws-docs-content-img">
58+
![A drawer is placed on the left side of a page.](./img/drawer-placement-left.svg)
59+
</div>
60+
61+
### Bottom
62+
<div class="ws-docs-content-img">
63+
![A drawer is placed on the bottom of a page.](./img/drawer-placement-bottom.svg)
64+
</div>
65+

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drawer/img/drawer-inline.svg

Lines changed: 242 additions & 0 deletions
Loading

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drawer/img/drawer-overlay.svg

Lines changed: 268 additions & 0 deletions
Loading

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drawer/img/drawer-placement-bottom.svg

Lines changed: 271 additions & 0 deletions
Loading

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drawer/img/drawer-placement-left.svg

Lines changed: 270 additions & 0 deletions
Loading

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drawer/img/drawer-placement-right.svg

Lines changed: 276 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)