useLazy API
API reference for the useLazy composable.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| useLazy | System |
| usePresence | System |
| useToggleScope | System |
| useIntersectionObserver | System |
Functions
useLazy
(active: MaybeRefOrGetter<boolean>, options?: LazyOptions) => LazyContextDeferred content rendering for performance optimization.
Options
eager
MaybeRefOrGetter<boolean> | undefinedWhen true, content renders immediately without waiting for activation.
Default: false
delay
number | undefinedDelay in milliseconds before activation. Prevents flash on quick hover-throughs by requiring the active state to persist for this duration before booting content.
Default: 0
Properties
hasContent
Readonly<Ref<boolean, boolean>>Whether content should be rendered. True when: isBooted OR eager OR active