function / @typed/ui/index

Tooltip.Content

Renders role="tooltip" content through the native Popover API.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Native content host
Since
1.0.0
Member of
Tooltip

Import

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

Access Tooltip.Content 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 declare function Content<const Options extends ContentOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, ContentInternalProps<Options>>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;

Why

Native top-layer output avoids reparenting into a private portal while real toggle/mouse/keyboard events synchronize renderer-independent state.

Ownership and lifetime

Running the Fx owns listeners and NativePopover observation in its Scope. A custom host must preserve id, role, manual popover, handlers, and one hydration ref owner.

Examples

import { Effect } from "effect"
import * as Tooltip from "@typed/ui/Tooltip"

const program = Effect.gen(function* () {
  const state = yield* Tooltip.makeState({ id: "save-help" })
  return Tooltip.Content({ state, content: "Stores changes" })
})

Other public imports

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

Source