Skip to content

Interface: CrowsNestOptions

Options for configuring a CrowsNest instance.

Properties

PropertyTypeDescription
manualKeyboardControl?"latch" | "nudge"How a manually-pushed keyboard state (via a CROWS_NEST_KEYBOARD_EVENT window event) interacts with Crows Nest's own keyboard detection: - 'latch' — once any manual event is received, Crows Nest stops running its own keyboard heuristic and trusts the consumer from then on. Use this when a native shell (e.g. Capacitor) is the source of truth for the keyboard. - 'nudge' — a manual event sets the state once, but the next automatic viewport recompute may override it. Defaults to 'latch'.
onDebug?(...args: []) => voidA callback invoked when a debug message is emitted.
overlaysContent?booleanWhen the VirtualKeyboard API is available, whether Crows Nest should enable navigator.virtualKeyboard.overlaysContent. This is required for the keyboard-inset-* values to populate (and therefore for the on-screen keyboard to shrink the observable safe area) rather than the browser resizing the whole layout viewport. Defaults to true — normalising these measurements is the whole point of the library. Set to false to leave the VirtualKeyboard mode under the app's own control, in which case keyboard state falls back to the pointer heuristic.