FixWindow API

This page provides an overview of the FixWindow component API, detailing its props, emits, slots, and exposed methods/states.

Props

The FixWindow component accepts the following props:

PropDefaultTypeDescription
modelValueundefinedboolean or undefinedControls the visibility of the fixed window.
elundefinedRefLink or undefinedThe target element for the fixed window.
scrollableElundefinedRefLink or undefinedThe scrollable element affecting the fixed window's position.
typePosition"fixed""absolute" or
"fixed" or
undefined
The CSS positioning style for the fixed window.
position"top"Position or
undefined
The position of the fixed window relative to the target element.
class""StyleClass or undefinedCustom CSS class for the fixed window container.
classBody""StyleClass or undefinedCustom CSS class for the body of the fixed window.
mode"filled"StyleMode or undefinedStyling mode for the fixed window.
eventOpen"hover"FixWindowEvent or undefinedEvent that triggers the opening of the fixed window.
eventClose"hover"FixWindowEvent or undefinedEvent that triggers the closing of the fixed window.
delay0100 or number or undefinedDelay before opening the fixed window (in milliseconds).
marginPx102 or 5 or number or undefinedMargin between the fixed window and the target element (in pixels).
translatePx02 or 5 or number or undefinedPixel translation for fine-tuning the fixed window's position.
paddingWindow02 or 5 or number or undefinedPadding for the fixed window's boundaries.
byCursorfalseboolean or undefinedPositions the fixed window based on cursor location.
closeButtonfalseboolean or undefinedEnables a close button for the fixed window.
stopOpenPropagationfalseboolean or undefinedPrevents event propagation when opening the fixed window.

Slots

The FixWindow component provides the following slots:

SlotPayloadDescription
defaultVNode[]The default content of the fixed window.

Emits

The FixWindow component emits the following events:

EventPayloadDescription
update:modelValuebooleanEmitted when the modelValue is updated, indicating the visibility state of the fixed window.
openMouseEvent or undefinedEmitted when the fixed window is opened.
closeMouseEvent or undefinedEmitted when the fixed window is closed.

Expose

The FixWindow component exposes the following methods and states via ref:

ExposeTypeDescription
xstringCurrent x-coordinate position of the fixed window.
ystringCurrent y-coordinate position of the fixed window.
isOpenbooleanIndicates whether the fixed window is open.
positionPositionCurrent position of the fixed window.
delaynumberCurrent delay before opening the fixed window.
marginPxnumberCurrent margin between the fixed window and the target element.
isCloseButtonbooleanIndicates whether the close button is enabled.
eventOpenFixWindowEventEvent type for opening the fixed window.
eventCloseFixWindowEventEvent type for closing the fixed window.
elementHTMLElementThe target HTML element for the fixed window.
open() => voidOpens the fixed window.
close() => voidCloses the fixed window.
updatePosition() => voidUpdates the position of the fixed window dynamically.

Types

FixWindowEvent

The FixWindowEvent type defines the possible events that can trigger the opening or closing of the fixed window:

ValueDescription
"hover"Triggered when the mouse hovers over the target element.
"click"Triggered when the target element is clicked.
"mousedown"Triggered when the mouse button is pressed down.
"mouseup"Triggered when the mouse button is released.
"dblclick"Triggered when the target element is double-clicked.
"contextmenu"Triggered when the context menu is opened (right-click).
"none"No event triggers the action.

StyleMode

Styling modes available for the fixed window:

ValueDescription
"filled"A filled background style.
"outlined"An outlined style.
"underlined"An underlined style.

Position

The Position type defines the relative position of the fixed window to the target element:

ValueDescription
"top"Positioned above the target element.
"bottom"Positioned below the target element.
"left"Positioned to the left of the target element.
"right"Positioned to the right of the target element.
"center"Centered relative to the target element.
"bottom-left"Positioned at the bottom-left corner of the target element.
"top-left"Positioned at the top-left corner of the target element.
"bottom-right"Positioned at the bottom-right corner of the target element.
"top-right"Positioned at the top-right corner of the target element.
"center-top"Centered horizontally at the top of the target element.
"center-bottom"Centered horizontally at the bottom of the target element.
"center-right"Centered vertically at the right of the target element.
"center-left"Centered vertically at the left of the target element.
"right-top"Positioned at the top-right corner of the target element's right.
"right-bottom"Positioned at the bottom-right corner of the target element's right.
"left-top"Positioned at the top-left corner of the target element's left.
"left-bottom"Positioned at the bottom-left corner of the target element's left.
© 2025 FishtVue by Egoka