Skip to content

QuickLook

Preview files, images, and text with Quick Look

QuickLook provides system preview functionality for various content types.

Use QuickLook to:

Note

Not available in Widget

Examples

javascript
let image = await fm.readImage("photo.png");
await QuickLook.present(image);
javascript
await QuickLook.present("/path/to/document.pdf");
javascript
await QuickLook.present("Hello, World!");

Methods

present

Present a Quick Look preview

Displays a preview of the provided content.

typescript
static present(item, fullscreen, callback): void
  • item - Content to preview (Image, file path, or text string)
  • fullscreen - Whether to present in fullscreen mode
  • callback - Completion callback when preview is dismissed

Example:

javascript
await QuickLook.present(content, false)