Affix shuai.meng, jiaming.wu, qinglin.wang September 9, 2026 Less than 1 minute The same scenarios, parameters and interactions as Cedar. Only component prefixes differ; themes and site shells remain independent.
Prop Description Type Default offset-top Distance from the scroll container top; accepts CSS lengths number / string0offset-bottom Distance from the bottom; takes precedence over offset-top, including 0 number / stringundefinedtarget Scroller or selector; finds nearest scrolling ancestor when omitted, falling back to window string / HTMLElement / Windowundefinedtarget-container Extra outer scroller to listen to; omitted means no extra listener, and it is not a clipping boundary string / HTMLElement / Windowundefinedz-index Stacking level number / string10disabled Disable affixing booleanfalsecss-mode Use native position: sticky, subject to ancestor overflow and container boundaries booleanfalse
Event Arguments and timing change (fixed: boolean, offset: number), when fixed state changes; offset is the threshold while fixed, otherwise distance to the corresponding container edge; disabling reports 0
Slot Description Arguments default Content to affix —
Method Description Arguments Returns updatePosition Rebind scrollers and recalculate on the next animation frame — Promise<void>
Props, event arguments, slots and methods match. CSS mode follows browser sticky rules; paired demos use independent scroll containers.