ISticky
interface
Layout & Sizing
Return shape of the useSticky composable. Exposes the root element ref, a reactive flag indicating whether the component is currently stuck, and the computed CSS styles for the layout item slot.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- rootElrequiredRef<HTMLElement | undefined>
- Template ref to the sticky component root element, used to measure its dimensions for the layout item slot.
- isStickyrequiredRef<boolean>
- True when the component has passed its scroll threshold and is currently in its sticky (fixed) position.
- layoutItemStylesrequiredRef<CSSProperties>
- Reactive CSS properties object (height, top, etc.) provided to the Nuxt/layout slot to preserve the space the sticky component occupies in the normal flow.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Consuming ISticky from useSticky