function / @typed/ui/index

Tooltip.setOpen

Sets tooltip visibility.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Open state
Since
1.0.0
Member of
Tooltip

Import

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

Access Tooltip.setOpen 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 setOpen<E, R>(state: RefSubject.RefSubject<State, E, R>, open: boolean): Effect.Effect<State, E, R>;

Why

Delayed focus/hover logic converges on one explicit state transition.

Ownership and lifetime

The Effect uses the existing state Scope and acquires no resource.

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" })
  yield* Tooltip.setOpen(state, true)
})

Other public imports

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

Source