tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[feat] Implement `prompt`

Open Kelin2025 opened this issue 3 years ago • 2 comments

Describe the problem

Hi! Great framework! I was trying to create a quick app, and I wanted to use browser's prompt function There's a @tauri-apps/api/dialog package which provides you with confirm, alert analogues, and even file selection. But, unfortunately, there is no prompt

Describe the solution you'd like

In browsers, it looks like this: Screenshot 2022-07-28 at 01 28 22 Would be cool to see the same thing:

import { prompt } from '@tauri-apps/api/dialog'

const name = await prompt("Type your name")

Alternatives considered

I was also trying to use window.prompt. Console says this function exists, but it does nothing

Additional context

No response

Kelin2025 avatar Jul 27 '22 22:07 Kelin2025

Would be a cool feature, but the upstream crate (https://github.com/PolyMeilex/rfd) doesn't support this yet, so it may take a while to implement.

FabianLars avatar Jul 28 '22 10:07 FabianLars

Hope to see this in v2

pavi2410 avatar Feb 04 '24 15:02 pavi2410