How to implement a multi-tab editor?

How to implement a multi-tab editor like vscode:

So that users can open and switch between multiple files.