SwooshUI is a modern, declarative UI language for the browser, inspired by the elegant simplicity of macOS's file bar. It brings the crisp, intuitive design language of desktop interfaces to the web, allowing developers to rapidly create clean, native-feeling UIs without relying on bloated libraries or verbose frameworks.
- 🖱️ MacOS-style UI syntax — Inspired by the top file bar found in macOS.
- 💡 Declarative language — Define your UI in simple, readable syntax.
- 🌐 Browser-first — Built specifically for web environments, no build tools required.
- ⚡ Lightweight & Fast — No dependencies, just drop and go.
- 🎨 Customizable — Theme and extend components with ease.
<script src="https://cdn.jsdelivr.net/npm/swooshui@latest/dist/swooshui.min.js"></script>
<swoosh-ui>
menu "File" {
item "New Window" action="newWindow()"
item "Open..." action="openFileDialog()"
separator
item "Exit" action="closeApp()"
}
menu "Edit" {
item "Undo" shortcut="Cmd+Z"
item "Redo" shortcut="Shift+Cmd+Z"
}
</swoosh-ui>
function newWindow() {
console.log("New Window triggered");
}
function openFileDialog() {
console.log("Open dialog launched");
}
function closeApp() {
console.log("App closed");
}
SwooshUI uses a domain-specific language within custom HTML tags:
<swoosh-ui>
menu "Menu Name" {
item "Label" action="functionName()" [shortcut="Cmd+S"]
separator
}
</swoosh-ui>
menu
defines a new dropdown.item
creates a clickable entry.action
binds to a JavaScript function.shortcut
displays keyboard shortcut hints.separator
adds a dividing line.
You can style SwooshUI using CSS variables:
:root {
--swoosh-bg: #f8f8f8;
--swoosh-hover: #e0e0e0;
--swoosh-font: "Helvetica Neue", sans-serif;
}
npm install swooshui
Then import it in your project:
import 'swooshui';
GPL 3.0 License © 2025 [🌐HPP Inc.]
Want to help shape SwooshUI? Contributions, ideas, and feedback are welcome! Please see the CONTRIBUTING.md file for guidelines.
Designed to bring the native desktop feel to the web, SwooshUI makes your browser-based apps feel right at home.