Skip to content

ComponentHandle

Defined in: api/node/typescript/index.ts:247 ↗

This interface describes the public API of a Slint component that is common to all instances. Use this to show() the window on the screen, access the window and subsequent window properties, or start the Slint event loop with run().

Use windowSymbol and globalsSymbol to access the window and the globals, even when a property, callback, or function of the component has the same name:

app[slint.windowSymbol]; // the same as app.window
app[slint.globalsSymbol].Logic; // the same as app.Logic, for a global Logic
js

readonly [globalsSymbol]: Readonly<Record<string, any>>

Defined in: api/node/typescript/index.ts:286 ↗

The globals of the component, by their name in JavaScript.


readonly [windowSymbol]: Window

Defined in: api/node/typescript/index.ts:281 ↗

The Window of the component.

get window(): Window

Defined in: api/node/typescript/index.ts:276 ↗

Returns the Window associated with this component instance. The window API can be used to control different aspects of the integration into the windowing system, such as the position on the screen.

Throws an error when accessed on non-windowed components such as ones inheriting from SystemTrayIcon.

Window

hide(): void

Defined in: api/node/typescript/index.ts:268 ↗

Hides the component’s window, so that it is not visible anymore. For a component inheriting SystemTrayIcon, sets its visible property to false.

void


run(): Promise<unknown>

Defined in: api/node/typescript/index.ts:256 ↗

Shows the window and runs the event loop. The returned promise is resolved when the event loop is terminated, for example when the last window is closed and the last visible system tray icon is hidden, or when quitEventLoop is called.

This function is a convenience for calling show, followed by runEventLoop, and hide when the event loop’s promise is resolved.

Promise<unknown>


show(): void

Defined in: api/node/typescript/index.ts:262 ↗

Shows the component’s window on the screen. For a component inheriting SystemTrayIcon, sets its visible property to true.

void


© 2026 SixtyFPS GmbH