Suvin Nimnaka Sukka
Suvin Nimnaka Sukka

Reputation: 492

How to create a floating window in VSCode extension?

Im trying to make a VSCode extension and is it possible to create a small window on top of the main window? Like Youtube Mini Player?


image1


It should be draggable up and down around the left corner. Any idea would be helpful!

Upvotes: 1

Views: 3136

Answers (1)

Mike Lischke
Mike Lischke

Reputation: 53502

You can create something that's similar, by using a WebView instance, which creates an absolutely positioned div within that page. This would not be movable outside of that WebView but at least you can freely position it within that.

But a bit of a warning: keep in mind vscode is mainly a text editor! It shouldn't be misused as a general webbrowser or media tool or something like that.

Upvotes: 1

Related Questions