Build whole apps from web components.
The Lit library behind Blackstone Publishing's internal apps.
Demo & docs · Setup · Changelog
[](https://bui.js.org) 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](https://bui.js.org/#/elements)** `bui/elements` | The building blocks: buttons, text, icons, labels, avatars, layout, and more | | **[Presenters](https://bui.js.org/#/presenters)** `bui/presenters` | Dialogs, menus, popovers, panels, forms, lists, calendars, tabs, and nav views | | **[Components](https://bui.js.org/#/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](https://bui.js.org/#/server)** `bui/server` | Node classes for REST APIs over MySQL, file storage, search, and realtime sync | | **[Utilities](https://bui.js.org/#/docs)** `bui/util` `bui/helpers` | Small functions and Lit/Backbone helpers used throughout | Every part has live examples in the [demo](https://bui.js.org), and [Docs](https://bui.js.org/#/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 ```bash 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](https://www.npmjs.com/package/blackstone-ui). See [Setup](https://bui.js.org/#/setup) for bundler aliases, styles, and PWA setup. ## A quick look Elements are plain HTML tags; presenters like dialogs are promises you await. ```js import { html } from 'lit' import 'bui/elements/btn' import Dialog from 'bui/presenters/dialog' async function remove(){ if( await Dialog.confirmDelete().modal() ) // ... } html`