interface / @typed/ui

Tooltip.AnchorOptions

Options for a tooltip anchor host.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Pointer and focus anchors
Since
1.0.0
Member of
Tooltip

Import

import { Tooltip } from "@typed/ui";

Access Tooltip.AnchorOptions through the imported Tooltip export. Its declaration below describes the member.

This public exposure is a re-export. Its import path is supported; declaration documentation is shared with the other public exposures below.

Signatures

export interface AnchorOptions extends Dom.HostOptions<HTMLSpanElement> {
    readonly state: RefSubject.HydratedRefSubject<State, Schema.SchemaError>;
    readonly content: Renderable.Any;
    readonly showDelay?: number;
    readonly hideDelay?: number;
}

Why

Pointer entry works with the default span. Keyboard focus behavior requires the host itself to be focusable, for example props: { tabindex: 0 } or a focusable custom host; focus and blur on descendants do not bubble to it.

Ownership and lifetime

Options are inert; rendering owns listeners/timers by Scope.

Property: content

Anchor content.

Property: content: Why

The anchor wraps descriptive content. A focusable descendant does not make the default span receive its non-bubbling focus and blur handlers.

Property: content: Ownership and lifetime

Dynamic content follows the anchor Scope.

Property: hideDelay

Delay in milliseconds before closing.

Property: hideDelay: Why

A delay prevents flicker during brief pointer movement.

Property: hideDelay: Ownership and lifetime

Newer schedules invalidate older delayed updates.

Property: showDelay

Delay in milliseconds before opening.

Property: showDelay: Why

A delay avoids accidental tooltip activation during pointer transit.

Property: showDelay: Ownership and lifetime

Delayed Effects run inside the component interaction lifetime; newer schedules invalidate older versions.

Property: state

Hydrated state shared with tooltip content.

Property: state: Why

Its id drives aria-describedby and its open value drives the popover.

Property: state: Ownership and lifetime

The anchor borrows state; its original Scope owns it.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source