Debian Codegraph @

node/@patternfly/patternfly/docs/components/BackToTop/examples/BackToTop.md

raw
1 ---
2 id: 'Back to top'
3 section: components
4 cssPrefix: pf-v6-c-back-to-top
5 ---import './BackToTop.css'
6
7 ## Examples
8
9 ### Basic
10
11 ```html
12 <div class="pf-v6-c-back-to-top">
13 <a class="pf-v6-c-button pf-m-primary" href="#">
14 <span class="pf-v6-c-button__text">Back to top</span>
15 <span class="pf-v6-c-button__icon pf-m-end">
16 <svg
17 class="pf-v6-svg"
18 fill="currentColor"
19 viewBox="0 0 320 512"
20 aria-hidden="true"
21 role="img"
22 width="1em"
23 height="1em"
24 >
25 <path
26 d="M177 159.7l136 136c9.4 9.4 9.4 24.6 0 33.9l-22.6 22.6c-9.4 9.4-24.6 9.4-33.9 0L160 255.9l-96.4 96.4c-9.4 9.4-24.6 9.4-33.9 0L7 329.7c-9.4-9.4-9.4-24.6 0-33.9l136-136c9.4-9.5 24.6-9.5 34-.1z"
27 />
28 </svg>
29 </span>
30 </a>
31 </div>
32
33 ```
34
35 ## Documentation
36
37 ### Usage
38
39 | Class | Applied to | Outcome |
40 | -- | -- | -- |
41 | `.pf-v6-c-back-to-top` | `<div>` | Initiates the back to top component. **Required** |
42 | `.pf-m-hidden` | `.pf-v6-c-back-to-top` | Modifies the component to be hidden. |