Skip to content

Affix

Pins content to the viewport: back-to-top buttons, floating help, save bars. Give it a top or bottom offset.

Example

Scroll this page: the help button below stays pinned to the bottom-right corner until you leave.

Tall filler so the page scrolls…

<Affix bottom="1rem" right="1rem">
  <Button>Help</Button>
</Affix>

Props

PropTypeDefaultDescription
top / bottomstring-Viewport offset; set one.
zIndexnumberoverlay tokenStacking override.

Accessibility