Interface: UseIsStuckOptions
Defined in: use-is-stuck.ts:7
Options for useIsStuck.
Properties
enabled?
optionalenabled?:boolean
Defined in: use-is-stuck.ts:30
Set to false to stop observing. isStuck is false while disabled, and
observing starts again when it is true. Default is true.
offset?
optionaloffset?:number
Defined in: use-is-stuck.ts:19
The distance in pixels between the root's edge and the element while it
is stuck, which is the value of its CSS top (or bottom, left,
right). A negative or non-finite value is treated as 0. Default is
0.
root?
optionalroot?:Document|Element|null
Defined in: use-is-stuck.ts:25
The scroll container the element sticks inside. Pass a scrollable element
when the sticky element is not stuck to the browser viewport. Passing a
new element re-observes. Default is the browser viewport (null).
side?
optionalside?:UseIsStuckSide
Defined in: use-is-stuck.ts:12
The edge of the root the element sticks to, matching the CSS property you
gave it (top, bottom, left or right). Default is "top".