Raxol. Effects. HoverHighlight
(Raxol v2.6.0)
View Source
Visual hover feedback for terminal widgets.
Highlights the widget region under the mouse cursor with a border glow, fill tint, or underline. Integrates with the MCP FocusLens to provide visual feedback when mouse tracking is active.
Example
highlight = HoverHighlight.new()
highlight = HoverHighlight.set_target(highlight, %{x: 5, y: 2, width: 20, height: 3})
buffer = HoverHighlight.apply(highlight, buffer)Configuration
config = %{
color: :cyan,
style: :border, # :border | :fill | :underline
intensity: 0.6, # 0.0-1.0 peak intensity
fade_ms: 200, # ms to fade after mouse leaves
enabled: true
}
Summary
Functions
Apply the hover highlight to a buffer.
Clear the highlight immediately (no fade).
Create a new hover highlight effect.
Enable or disable the effect.
Set the target widget bounds. Pass nil to start fade-out.
Update configuration.
Whether anything would render right now.
Types
@type bounds() :: %{ x: non_neg_integer(), y: non_neg_integer(), width: non_neg_integer(), height: non_neg_integer() }
@type config() :: %{ optional(:color) => atom(), optional(:style) => :border | :fill | :underline, optional(:intensity) => float(), optional(:fade_ms) => non_neg_integer(), optional(:enabled) => boolean() }
Functions
@spec apply(t(), Raxol.Core.Buffer.t()) :: Raxol.Core.Buffer.t()
Apply the hover highlight to a buffer.
Clear the highlight immediately (no fade).
Create a new hover highlight effect.
Enable or disable the effect.
Set the target widget bounds. Pass nil to start fade-out.
Update configuration.
Whether anything would render right now.