Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Textual In Browser? #53

Closed
carsonharmon opened this issue Aug 11, 2021 · 4 comments
Closed

Textual In Browser? #53

carsonharmon opened this issue Aug 11, 2021 · 4 comments

Comments

@carsonharmon
Copy link

Hi Will,

I love the TUI aesthetic and wanted to make a personal website for myself based on something like xterm.js.

I saw your AMA on Reddit about textual, and since it has more in common with JS frameworks, I was wondering if there was a way to display the TUI's in a browser?

Thanks for your time and for your open source work.

@lllama
Copy link
Contributor

lllama commented Aug 11, 2021

So I'm pretty sure I've seen Textual running in the terminal in VS Code, and that uses xterm.js so there's no reason it won't work in the browser.

@willmcgugan
Copy link
Collaborator

THere's no build in way at the moment, but I'm sure any terminal in a browser solution will work just fine.

@lllama
Copy link
Contributor

lllama commented Aug 11, 2021

I've used this before to host a bash prompt on a website: https://tsl0922.github.io/ttyd/

I'm sure you could point it at a Textual app.

@eudoxos
Copy link

eudoxos commented Jul 27, 2022

For the record, ttyd works nicely (ttyd -p 9090 python3 -m textual.app), it also handles multiple clients gracefully — each new client gets its own instance of the app.

It is not visually perfect, though it might be perhaps improved by specifying custom font via ttyd theming params (-t; tsl0922/ttyd#31 discusses custom fonts).

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants