Skip to content

Affix

Overview

Affix applies position: sticky with configurable top/bottom offset using Paramanu spacing tokens. Useful for sticky headers, toolbars, table headers, and floating action buttons.

Usage

<div class="pm-affix pm-affix--top">Sticky header</div>
<div class="pm-affix pm-affix--bottom pm-affix--offset-4">Sticky footer with offset</div>

Guidelines

  • Use for elements that should remain visible during scrolling
  • The offset maps to Paramanu spacing tokens (--pm-spacing-*)
  • The element sticks within its parent’s scroll context
  • Combine with z-index utilities if needed for stacking

API

PropTypeDefaultDescription
position"top" | "bottom""top"Which edge to stick to
offsetSpacingScale-Distance from the sticky edge