Elements

Components

Affix

A nail: the wrapped content travels with the page until it reaches its offset, then stays put while the page moves on. The semantics are plain `position: sticky` — pinning is relative to the nearest *scrolling* ancestor, so the element works inside a scrollable panel exactly as it does on the page itself, and a parent with `overflow: hidden` clips the pin. Both offsets may be given: the content then holds its place inside that band.

#Basic usage

affix/basic Vue React
Reading tools·ContentsPrintShare

Passage 1 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 2 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 3 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 4 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 5 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 6 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 7 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 8 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 9 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 10 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 11 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 12 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 13 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 14 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 15 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

Passage 16 — the tools travel with the reader: once their row reaches the top of the page it stays there while the chapters move on underneath.

affix/offset-bottom Vue React
Reading tools·ContentsPrintShare

Passage 1 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 2 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 3 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 4 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 5 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 6 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 7 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 8 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 9 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 10 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 11 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 12 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 13 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 14 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 15 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

Passage 16 — with both offsets given, the row holds its place inside the band between them: clear of the header, clear of the page's end.

#Props

#Affix

A nail: the wrapped content travels with the page until it reaches its offset, then stays put while the page moves on. The semantics are plain position: sticky — pinning is relative to the nearest scrolling ancestor, so the element works inside a scrollable panel exactly as it does on the page itself, and a parent with overflow: hidden clips the pin. Both offsets may be given: the content then holds its place inside that band.

PropTypeDefaultDescription
offsetTopString"0px"—
offsetBottomString"0px"—