
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
BubbWeb is a library for running Bubbletea terminal user interfaces in WebAssembly.
Check out the live demo to see BubbWeb in action.
import (
tea "github.com/charmbracelet/bubbletea"
"github.com/tmc/bubbweb"
)
func main() {
// Create your BubbleTea model as usual
model := yourModel()
// Use bubbweb to run the program in WebAssembly
prog := bubbweb.NewProgram(model, tea.WithAltScreen())
if _, err := prog.Run(); err != nil {
// Handle error
}
}
# Build everything with go generate
go generate
# For local testing with auto-reload
cd example
go run github.com/tmc/serve@latest # or any other HTTP server
Then open http://localhost:8080 in your browser.
See the example directory for a complete example including:
This project can be easily deployed on GitHub Pages:
example directory to your GitHub repositoryexample directory/ or /example depending on your repository structureYour Bubbletea WebAssembly application will be available at https://[username].github.io/[repository]/example
BubbWeb handles several challenges of running Bubbletea in WebAssembly:
bubbletea_write: Sends input from JavaScript to the Go programbubbletea_read: Reads output from the Go programbubbletea_resize: Sends terminal resize events to the Go programbubbletea_mouse: Sends mouse events to the Go programMouse events are translated from browser events to BubbleTea's mouse event system:
case tea.MouseMsg:
switch msg.Type {
case tea.MousePress:
// Handle mouse press at (msg.X, msg.Y)
case tea.MouseRelease:
// Handle mouse release
case tea.MouseMotion:
// Handle mouse movement
case tea.MouseWheelUp, tea.MouseWheelDown:
// Handle scrolling
}
}
The coordinates are automatically converted from pixel coordinates to terminal cell coordinates.
MIT
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.