Debian Codegraph @

node/@patternfly/react-core/src/components/Progress/examples/Progress.md

raw
1 ---
2 id: Progress
3 section: components
4 cssPrefix: pf-v6-c-progress
5 propComponents: ['Progress']
6 ---
7
8 import { useState } from 'react';
9
10 ## Examples
11
12 ### Basic
13
14 ```ts file="./ProgressBasic.tsx"
15
16 ```
17
18 ### Small
19
20 ```ts file="./ProgressSmall.tsx"
21
22 ```
23
24 ### Large
25
26 ```ts file="./ProgressLarge.tsx"
27
28 ```
29
30 ### Outside
31
32 ```ts file="./ProgressOutside.tsx"
33
34 ```
35
36 ### Inside
37
38 ```ts file="./ProgressInside.tsx"
39
40 ```
41
42 ### Single line
43
44 ```ts file="./ProgressSingleLine.tsx"
45
46 ```
47
48 ### Without measure
49
50 ```ts file="./ProgressWithoutMeasure.tsx"
51
52 ```
53
54 ### Finite step
55
56 ```ts file="./ProgressFiniteStep.tsx"
57
58 ```
59
60 ### Progress with step instructions
61
62 ```ts file="./ProgressStepInstruction.tsx"
63
64 ```
65
66 ### Truncate title
67
68 ```ts file="./ProgressTruncateTitle.tsx"
69
70 ```
71
72 ### Title outside of progress bar
73
74 ```ts file="./ProgressTitleOutsideOfProgressBar.tsx"
75
76 ```
77
78 ### Helper text
79
80 ```ts file="./ProgressHelperText.tsx"
81
82 ```
83
84 ## Status examples
85
86 When conveying status, you should ensure:
87
88 - There is visible helper text that explains the status.
89 - The helper text includes the status icon, as seen in our [basic helper text example](/components/helper-text#basic).
90 - The helper text is linked to the `<Progress>` component via the `aria-describedby` property, as seen in the [progress helper text example](#helper-text).
91
92 ### Success
93
94 ```ts file="./ProgressSuccess.tsx"
95
96 ```
97
98 ### Failure
99
100 ```ts file="./ProgressFailure.tsx"
101
102 ```
103
104 ### Warning
105
106 ```ts file="./ProgressWarning.tsx"
107
108 ```
109
110 ### Interactive status icon and measure location
111
112 ```ts file="./ProgressInteractiveFailure.tsx"
113
114 ```