Blackstone UI
Build whole apps from web components.
The Lit library behind Blackstone Publishing's internal apps.
Demo & docs · Setup · Changelog
BUI has UI elements, dialogs and lists, an app shell with routing, and the Node server classes to back them. Use one piece, or all of it.
What's inside
Core bui/elements |
The building blocks: buttons, text, icons, labels, avatars, layout, and more |
Presenters bui/presenters |
Dialogs, menus, popovers, panels, forms, lists, calendars, tabs, and nav views |
Components bui/components |
Larger features ready to drop in: comments, file manager, search, tag lists |
App bui/app |
The app shell (sidebar, topbar, panels), router, views, and error handling |
Server bui/server |
Node classes for REST APIs over MySQL, file storage, search, and realtime sync |
Utilities bui/util bui/helpers |
Small functions and Lit/Backbone helpers used throughout |
Every part has live examples in the demo, and Docs lists every documented file.
Why BUI
- Any screen. Layouts adapt on their own, from a desktop sidebar to a phone tab bar
- Themeable. Light and dark modes and accent colors; restyle with CSS variables and
::part - Routed. Views, tabs, and panels get URLs, so links, back, and forward just work
- Take what you need. Import one element, or build a whole app on the shell. It all works with Lit
Install
npm install https://github.com/kjantzer/bui.git --save
BUI changes too often to publish consistent versions, so install it from GitHub rather than the (outdated) npm package. See Setup for bundler aliases, styles, and PWA setup.
A quick look
Elements are plain HTML tags; presenters like dialogs are promises you await.
import { html } from 'lit'
import 'bui/elements/btn'
import Dialog from 'bui/presenters/dialog'
async function remove(){
if( await Dialog.confirmDelete().modal() )
// ...
}
html`<b-btn icon="delete" color="red" @click=${remove}>Delete</b-btn>`
Run the demo
The demo is the best way to see how the pieces fit together.
git clone https://github.com/kjantzer/bui.git
cd bui
npm install
npm start
Then open http://localhost:1234
Status
BUI is developed almost daily by a small team at Blackstone Publishing and runs in production there, so the latest commit should be stable. Breaking changes are noted in the changelog.
The docs can trail the code; when in doubt, the source is the reference. Found a bug? Please open an issue or a PR.
