Layout
Affix
Content that sticks to the top or bottom of the viewport once you scroll it into place.
ReactVueWeb Components
View in Storybook Playground
Examples
<Affix offset={16}><Toolbar /></Affix> Props
| Name | Type | Default | Description |
|---|---|---|---|
offset | number | 0 | Sticky offset in px from the edge. @default 0 |
position | 'top' | 'bottom' | top | Which edge to stick to. @default 'top' |
children | ReactNode | — |
Accessibility
- Body/background contrast is ≥ 7:1 (AAA) in both light and dark.
- Every interaction works with the keyboard alone.
- The focus ring is always visible.
- Respects prefers-reduced-motion and stops excessive motion.
Every component is designed to meet WCAG 2.1 AAA.