Component

Affix

Pin content on scroll with sticky positioning. Includes StickyHeader and StickySidebar helpers.

tsx
import { Affix, StickyHeader, StickySidebar } from 'wss3-forge'

Usage

Affix for custom sticky positioning

StickyHeader for fixed navigation bars

StickySidebar for side navigation

Callback when sticky state changes


Affix, StickyHeader and StickySidebar components allow you to pin content on scroll. They are used in this documentation for the sidebar and header.

Examples

Affix / Sticky Components

Affix, StickyHeader and StickySidebar components allow you to pin content on scroll. They are used in this documentation for the sidebar and header.

tsx
1<Affix offsetTop={80}>
2 <Card>This becomes sticky when scrolled</Card>
3</Affix>
4
5<StickyHeader shadow blur>
6 <Navbar />
7</StickyHeader>
8
9<StickySidebar topOffset={80} bottomOffset={24}>
10 <nav>Sidebar navigation</nav>
11</StickySidebar>

Previous

TextTruncate

Next

Animate

Last updated: December 2025

Cookies

We use cookies to improve your experience and save your preferences.