Raxol.UI.Components.HintDisplay (Raxol v2.0.1)

View Source

Hint display component for contextual help and tooltips.

Provides inline hints, tooltips, and contextual help for UI components.

Summary

Functions

Clears all hints.

Gets hint for a component.

Initializes hint display configuration.

Registers a hint for a component.

Removes a specific hint.

Renders a hint display.

Renders inline hint next to content.

Types

config()

@type config() :: %{
  enabled: boolean(),
  position: atom(),
  delay: integer(),
  style: atom(),
  max_width: integer(),
  hints: map()
}

hint()

@type hint() :: %{text: binary(), type: atom(), priority: integer()}

Functions

clear_hints(config)

@spec clear_hints(config()) :: config()

Clears all hints.

get_hint(arg1, component_id)

@spec get_hint(config(), binary()) :: hint() | nil

Gets hint for a component.

init(opts \\ [])

@spec init(keyword() | map()) :: config()

Initializes hint display configuration.

register_hint(config, component_id, text, opts \\ [])

@spec register_hint(config(), binary(), binary(), keyword()) :: config()

Registers a hint for a component.

remove_hint(config, component_id)

@spec remove_hint(config(), binary()) :: config()

Removes a specific hint.

render(arg1, config)

@spec render(hint(), config()) :: binary()

Renders a hint display.

render_inline(content, component_id, config)

@spec render_inline(binary(), binary(), config()) :: binary()

Renders inline hint next to content.