isHoverEnabled
Commons
stable
Type guard that returns true when hover interactions should be active: when the value is undefined (default-on) or any truthy value. Falsy values (false, 0, "") disable hover.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- valuerequiredany
- The raw prop value controlling hover. undefined means the prop was not set and hover defaults to enabled; any falsy value other than undefined disables it.
API
Return value
The value returned by this util.
- true when hover is enabled (value is undefined or truthy), narrowing the type to true. false otherwise.
Usage
Examples
Ready-to-paste usage snippets.
Checking hover state from a prop