Skip to content
Tauri

app

Functions

defaultWindowIcon()

function defaultWindowIcon(): Promise<Image | null>

Get the default window icon.

Returns

Promise<Image | null>

Example

import { defaultWindowIcon } from '@tauri-apps/api/app';
await defaultWindowIcon();

Since

2.0.0

Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L98


getName()

function getName(): Promise<string>

Gets the application name.

Returns

Promise<string>

Example

import { getName } from '@tauri-apps/api/app';
const appName = await getName();

Since

1.0.0

Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L38


getTauriVersion()

function getTauriVersion(): Promise<string>

Gets the Tauri version.

Returns

Promise<string>

Example

import { getTauriVersion } from '@tauri-apps/api/app';
const tauriVersion = await getTauriVersion();

Since

1.0.0

Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L53


getVersion()

function getVersion(): Promise<string>

Gets the application version.

Returns

Promise<string>

Example

import { getVersion } from '@tauri-apps/api/app';
const appVersion = await getVersion();

Since

1.0.0

Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L24


hide()

function hide(): Promise<void>

Hides the application on macOS.

Returns

Promise<void>

Example

import { hide } from '@tauri-apps/api/app';
await hide();

Since

1.2.0

Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L83


show()

function show(): Promise<void>

Shows the application on macOS. This function does not automatically focus any specific app window.

Returns

Promise<void>

Example

import { show } from '@tauri-apps/api/app';
await show();

Since

1.2.0

Source: https://github.com/tauri-apps/tauri/blob/dev/tooling/api/src/app.ts#L68


© 2024 Tauri Contributors. CC-BY / MIT