Batoi UIF Documentation
Batoi UIF is the dependency-free interface framework for building governed, accessible, and operationally useful Batoi Platform experiences.
It provides a practical browser-native foundation for server-rendered pages, product surfaces, workspace tools, dashboards, forms, registers, editors, data visualization, AI-assisted interfaces, realtime regions, push controls, mobile shells, and theme customization.
What UIF Covers
- Layout systems for public and authenticated application surfaces
- Interface controls for forms, buttons, filters, badges, overlays, dropdowns, drawers, modals, tabs, accordions, tables, and action areas
- SVG-first icons, charts, dashboards, statistical helpers, business charts, finance charts, and Flint-compatible chart inputs
- Rich HTML and Markdown editor surfaces that keep the source form field synchronized
- Declarative actions, animations, realtime regions, push controls, mobile shells, AI actions, and MCP approval widgets
- Theme tokens for brand color, accent, density, radius, and typography
- Micro App patterns for contained client-side application surfaces inside larger Batoi pages
UIF 4.0.0 Highlights
- Selective Essential, Web, RAD, Mobile, and Desktop JavaScript and CSS profiles with measured first-load budgets.
- Cooperative application ownership so compatibility and selective runtimes do not compete for the same subtree.
- Explicit refresh, rehydrate, suspend, resume, and destroy lifecycle behavior for application-owned updates.
- Independent component imports and icon subsets for smaller production graphs.
- Stricter configuration, cancellable effects, overlay focus and race fixes, and root-scoped RAD, form, and table behavior.
- Generated v4 component contracts, examples, capability references, consumer checks, SBOM, provenance, and integrity metadata.
- Experimental local theme compiler, CLI, MCP, and isolated studio tooling with bounded typed-token validation and reviewed-artifact identity checks.
UIF 3.1 Compatibility
- Reliable direct links to generated component-gallery anchors, including normal same-document history navigation.
- Opt-in carousel autoplay with bounded intervals, pause and resume controls, reduced-motion handling, interaction and page-visibility pauses, and timer cleanup.
- A working multi-image gallery that displays two images and advances one item per step with ordered wraparound and accurate status text.
- Responsive outer spacing for the browser-extension example.
- Square-cornered vertical, horizontal, grouped, stacked, histogram, and waterfall bars so axes and stacked joins remain flush.
Version 3 Foundation Retained
- A consolidated lifecycle, declarative attribute, action, event, state, error, component, and configuration contract.
- Curated All, RAD, Dashboard, Mobile, Desktop, and Agent package profiles over the same dependency-free runtime.
- Diagnostic migration support for v2 applications and an explicit strict v3 compatibility mode.
- Versioned design tokens, compact density, high contrast, forced-colors, reduced-motion, localization, and logical-direction RTL support.
- Exact origin-and-path URL capabilities, bounded parsing and resources, partitioned application/tenant/principal storage, and privacy-safe opt-in diagnostics.
- Governed, provider-neutral AI and MCP surfaces with same-origin transports, explicit approval, replay protection, progress, receipts, and server authority.
- Principal-owned Micro App and PWA persistence, bounded retry and capacity behavior, conflict recovery, and owner-scoped cleanup.
- Generated API, component-contract, design-token, migration, accessibility, security, SBOM, provenance, and artifact-integrity references.
- Cross-browser release journeys covering Chromium, Firefox, WebKit, and mobile Chromium.
Public Example Snapshot
The bundled public package and current source release both identify as version 4.0.0 at source revision 4eb9833. The full distribution retains the 3.1-compatible facade, while dist/v4/ provides selective browser profiles and CSS.
For theme integration, exact CSS tokens, component markup, layout utilities, printing, and Bootstrap migration, start with the CSS & Style Guide.
The Component Gallery includes a live multi-item carousel using data-uif-items-per-slide="2" and data-uif-step="1". Automatic playback remains opt-in and respects reduced-motion and user interaction. Arbitrary website crawling and XML export are not browser examples; they require a governed server implementation.
UIF 4 is stable for its implemented scope, but manual assistive-technology and device acceptance, hosted assistant workflows, and real RADX route, migration, and rollback pilots remain deferred. Theme authoring tools are experimental and local-only; they do not provide hosted OAuth, public assistant connectors, asset materialization, or native OS applications.
Recommended Reading
| Page | Purpose |
|---|---|
| Getting Started | Learn how UIF is loaded and used inside Batoi pages |
| Micro Apps | Understand the contained client-side application model |
| Examples | Review the curated example applications |
| Components | Review current component families and interaction patterns |
| Editors | Implement rich HTML and Markdown editing, diagnostics, autosave, and governed uploads |
| Charts and Visualization | Review native chart families, Flint-compatible inputs, and browser-only visualization guidance |
| Chart Compatibility | Check native chart contracts, Flint name mappings, unsupported families, and chart QA expectations |
| MCP Support | Build MCP-ready approval, preview, validation, and audit surfaces while keeping privileged tools on the backend |
| Tables and Registers | Review local, remote, hybrid, responsive, and action-oriented table patterns |
| Tokens and Theming | Customize visual tokens and export theme CSS |
| Utilities and Generators | Use bounded layout utilities and copy-ready interface generators |
| Localization and RTL | Configure locale-aware formatting, messages, and logical-direction layouts |
| Package Profiles and Migration | Choose a selective v4 browser profile while retaining the compatibility facade where required |
| API Reference | Review the current browser-facing usage patterns |
| Compatibility and Release Policy | Review browser baselines, API stability, artifact integrity, budgets, and release gates |
Browser Distribution
Use the built browser assets in server-rendered pages, PHP/RAD routes, or static HTML without requiring a frontend build step.
<link rel="stylesheet" href="/assets/batoi-uif-main/dist/uif.css">
<script src="/assets/batoi-uif-main/dist/uif.iife.js"></script>
<script>
BatoiUIF.autoStart(document);
</script>For module-based examples, import from /assets/batoi-uif-main/dist/uif.esm.js.
Public Examples
The curated Batoi.com examples are available from /platform/uif and the Examples Home link on that page.
They demonstrate how UIF can support both focused patterns and fuller client-only applications.
The maintained public example gallery is available at https://www.batoi.com/assets/batoi-uif-main/examples/, including component, chart, icon, table, editor, event-action, professional showcase, and RAD examples.