The affix component toggles
position: fixedon and off, emulating the effect found withposition: sticky.
The navigation on the right is a live demo of the affix component (hidden on mobile devices).
Note:
<affix :offset="50">
<ul>
<li>...</li>
<li>...</li>
<li>...</li>
</ul>
</affix>
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
offset | Number | 0 | Pixels to offset from screen when calculating position of scroll. |
| Name | Description |
|---|---|
default | The affix body. |
| Name | Description |
|---|---|
affix | This event fires immediately before the element has been affixed. |
affixed | This event is fired after the element has been affixed. |
Caught a mistake or want to contribute to the documentation? Edit this page on Github!
Designed and built by @wxsm
Code under MIT License
Document under CC BY 4.0