Skip to main content
On this pageTypes

Ui/HoverIntent

Types

InitConfig

typesource
/** Configuration for creating a HoverIntent Model. */
type InitConfig = Readonly<{
  closeDelay: Duration.Input
  openDelay: Duration.Input
}>

RenderInfo

typesource
/**
 * Render-time payload published to the consumer's `toView`.
 * 
 * - `trigger`: event attributes for the element that starts intent.
 * - `panel`: event attributes for the element that remains open while hovered or focused.
 * - `isVisible`: whether the consumer should render its panel.
 */
type RenderInfo = Readonly<{
  isVisible: boolean
  panel: ReadonlyArray<ChildAttribute>
  trigger: ReadonlyArray<ChildAttribute>
}>

ViewInputs

typesource
/** Per-render view inputs passed to `view` via `h.block`'s `viewInputs` field. */
type ViewInputs = Readonly<{
  focusTriggerSelector: string
  toView: (render: RenderInfo) => Html
}>