Skip to content

Commit 7e1602f

Browse files
committed
Finalizes content to open pr.
1 parent e7f7896 commit 7e1602f

File tree

1 file changed

+47
-29
lines changed
  • packages/documentation-site/patternfly-docs/content/components/pagination

1 file changed

+47
-29
lines changed

packages/documentation-site/patternfly-docs/content/components/pagination/pagination.md

Lines changed: 47 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -12,62 +12,80 @@ Pagination allows users to conveniently navigate through content-dense component
1212
![a full page demo with a table and a pagination component within a toolbar.](./img/pagination-elements.svg)
1313
</div>
1414

15-
1. **Top pagination:** Placed above the component it controls and right-aligned.
15+
1. **Top pagination:** Placed above the component it controls and aligned to the right.
1616

17-
2. **Bottom pagination:** Placed below the component it controls. Right-aligned for desktop views and center-aligned for mobile. If you want the bottom pagination to be sticky so it does not move out of view as users scroll through long content, place it directly after the component it controls and refer to the [React sticky pagination](/components/pagination#sticky) or [HTML bottom sticky pagination](/components/pagination/html#bottom-sticky) examples for further implementation guidance.
17+
2. **Bottom pagination:** Placed below the component it controls. Right-aligned for desktop views and center-aligned for mobile. If you want bottom pagination to be sticky so that it remains in view as users scroll through long content, place it directly after the component it controls and refer to the [React sticky pagination](/components/pagination#sticky) or [HTML sticky pagination](/components/pagination/html#bottom-sticky) examples for implementation guidance.
1818

1919
## Variations
2020

21-
- [Full pagination](#full-pagination)
22-
- [Compact pagination](#compact-pagination)
23-
- [Indeterminate pagination](#indeterminate-pagination)
21+
There are 3 pagination variations you can choose from, depending on your use case:
22+
- [Full pagination:](#full-pagination) The default component to use for most desktop views when space is not a major constraint.
23+
- [Compact pagination:](#compact-pagination) Used for narrow spaces or as the primary control for mobile views.
24+
- [Indeterminate pagination:](#indeterminate-pagination) Used when the total number of items is unknown.
2425

2526
### Full pagination
2627

27-
A default "full pagination" component contains multiple controls for navigating the related component. Use a full pagination unless you're restricted to a narrow workspace, in which can you should use a [compact pagination](#compact-pagination) instead.
28-
29-
When using full pagination a toolbar, you'll have limited room for other items like bulk selectors, buttons, filters, or input fields. You can still incorporate these additional actions with an [overflow menu](/components/toolbar/design-guidelines#overflow-menu), which will automatically form when those additional items need to collapse at specific breaking points. On mobile, full pagination will also collapse to a pagination summary with an item count. Learn how to customize overflow menu breakpoints in our [toolbar design guidelines](/components/toolbar/design-guidelines).
30-
31-
#### Desktop full pagination in toolbar
32-
3328
<div class="ws-docs-content-img">
34-
![an example of a desktop pagination component within a toolbar.](./img/toolbar-pagination.svg)
29+
![Annotations for each element of a full pagination.](./img/full-pagination.svg)
3530
</div>
3631

37-
1. **Displayed items selector:** Allows users to choose the number of items shown at once.
32+
1. **Per-page selector:** Used to choose the number of items displayed on a single page at once.
33+
2. **First page/last page:** Used to jump to the first or last page of content.
34+
3. **Previous page/next page:** Used to navigate back or forward one page of content at a time.
35+
4. **Current page (interactive):** Displays the current location and the total number of pages of content. Users can also manually type in a page number to jump to a desired location.
3836

39-
2. **Full pagination:** Supplies pagination controls, including page-back and page-forward, page-first and page-last, and a manual option to type in a desired page number.
37+
Full pagination contains a variety of controls that can be used to navigate the linked component, like a table or card view. This is the default recommendation, unless you're restricted in space or for use on mobile devices, in which case you should use [compact pagination](#compact-pagination) instead.
4038

41-
#### Mobile full pagination in toolbar
39+
### Compact pagination
4240

4341
<div class="ws-docs-content-img">
44-
![Example of pagination on mobile table view.](./img/mobile-pagination.svg)
42+
![Example of a compact pagination.](./img/compact-pagination.svg)
4543
</div>
4644

47-
1. **Pagination summary:** At this screen size, the top toolbar only shows the item count to summarize the number of items currently in view. It hides all other pagination controls.
45+
1. **Per-page selector:** Used to choose the number of items displayed on a single page at once.
46+
2. **Previous page/next page:** Used to navigate back or forward one page of content at a time.
4847

49-
2. **Full pagination:** Supplies pagination controls, including page-back, page-forward, and a displayed items selector, which allows users to choose the number of items shown at once.
48+
Compact pagination reduces visual crowding and saves space for additional actions in limited spaces, like toolbars.
5049

51-
The default recommendation for using pagination in mobile views is to place a pagination summary above the component it controls and a full pagination below the component, as shown in this example. If you can't use bottom pagination, or if you can't use the fall pager in the bottom toolbar for some reason, only then you can place the full pagination in the top toolbar. **Do not** use a full pagination in both the top and bottom toolbars.
50+
### Indeterminate pagination
5251

53-
### Compact pagination
52+
When it's difficult to calculate the total number of items or page count upfront, you can use an indeterminate pagination, which replaces the total page number in the per-page selector with a general label of “many”. Users can still choose the number of items shown at once, and the indeterminate label can be used within both full and compact pagination components.
53+
54+
<div class="ws-docs-content-img">
55+
![Example of a indeterminate pagination.](./img/indeterminate-pagination.svg)
56+
</div>
5457

55-
Compact pagination saves space for additional actions in limited spaces, like toolbars, and can help reduce visual crowding. Like with full pagination, compact pagination condenses to a pagination summary for mobile views.
58+
## Placement
5659

57-
#### Desktop compact pagination in toolbar
60+
### Desktop
61+
62+
For desktop views, place a full pagination component above the content it controls, typically within a toolbar.
5863

5964
<div class="ws-docs-content-img">
60-
![Example of a compact pagination.](./img/compact-pagination.svg)
65+
![an example of a desktop pagination component within a toolbar.](./img/toolbar-pagination.svg)
6166
</div>
6267

63-
1. **Displayed items selector:** Allows users to choose the number of items shown at once.
68+
1. **Per-page selector:** Used to choose the number of items displayed on a single page at once.
6469

65-
2. **Compact pagination:** Supplies pagination controls, including page-back and page-next controls.
70+
2. **Full pagination:** Supplies data navigation controls, including previous page and next page, first page and last page, and a manual option to type in a desired page number.
6671

67-
### Indeterminate pagination
72+
When used in a toolbar, pagination may leave limited room for other items like filters or bulk selectors. These additional items will automatically move into an [overflow menu](/components/toolbar/design-guidelines#overflow-menu) as needed.
73+
74+
For components with long, scrolling content (like a table), you can add a second full pagination component below the content to ensure that users can navigate without having to scroll back to the top.
75+
76+
### Mobile
6877

69-
Use indeterminate pagination if it’s difficult to calculate the total number of items or page count upfront. In these cases, you use “many” instead of a specific page count that would otherwise appear. Users can still select this control to choose the number of items shown at once.
78+
Mobile pagination is formatted differently in order to conserve space. On mobile, full pagination will collapse to a pagination summary with an item count. [Learn how to customize overflow menu breakpoints in our toolbar design guidelines](/components/toolbar/design-guidelines).
7079

7180
<div class="ws-docs-content-img">
72-
![Example of a indeterminate pagination.](./img/indeterminate-pagination.svg)
73-
</div>
81+
![Example of pagination on mobile table view.](./img/mobile-pagination.svg)
82+
</div>
83+
84+
1. **Pagination summary:** A non-interactive count of items currently displayed.
85+
86+
2. **Mobile pagination:** A type of compact pagination, with a previous page, next page, and a per-page selector, which allows users to choose the number of items shown at once. Mobile views use compact styling, which removes the first page and last page controls.
87+
88+
When using pagination in mobile views, follow these best practices:
89+
- As shown in this example, place a pagination summary above the component it controls and a mobile pagination below the component.
90+
- Do not use full pagination in both the top and bottom toolbars.
91+
- If you can't use bottom pagination, or if you can't use the compact pagination in the bottom toolbar for some reason, only then you can place the compact pagination in the top toolbar.

0 commit comments

Comments
 (0)