Skip to main content
Batoi Press Docs

Batoi UIF and AIF

Understand the bundled UIF primitives and disabled-by-default AIF scaffolding included with Batoi Press.

Version 1.6.1 Active public source Reviewed Aug 19, 2026 Next review Oct 21, 2026

Owner: Batoi Engineering Reviewed by: Batoi Press Maintainers Source revision: 72bd58f

Browse Batoi Press Documentation Batoi UIF and AIF

Batoi UIF and AIF

Batoi Press includes local Batoi UIF primitives for admin and installer screens, and governed Batoi AIF assistance for page and post editors. Batoi Press 2.1.x bundles Batoi UIF 3.0.0 while keeping legacy UIF public URLs synchronized for compatibility. AIF remains opt-in: external providers are disabled until an owner approves the provider, credentials, data fields, retention, and quotas. The bundled local provider requires no network call.

Batoi Press UIF and AIF boundary A diagram showing local UIF assets loaded by admin screens and disabled AIF provider boundaries. UIF assets uif.css, uif.js component notes Admin and installer local rendering no external build step AIF status disabled provider no network calls Custom public themes may use UIF, but they are not required to.

Bundled UIF

Batoi Press bundles UIF primitives locally for admin and installer screens.

Runtime files:

public_html/assets/uif/uif.css
public_html/assets/uif/uif.js
public_html/assets/uif/uif.iife.js
public_html/assets/uif/uif.esm.js
radpress/uif/manifest.json
radpress/uif/components/

The admin console renders through Batoi\Press\Admin\AdminLayout, which loads the local UIF stylesheet and script. The public custom theme layer is independent: a theme may use UIF, but Batoi Press does not require public themes to be UIF-only.

UIF Usage In Admin

The current admin console uses UIF-backed primitives for:

  • Grouped sidebar navigation.
  • Topbar actions.
  • Page headers.
  • Stats cards.
  • Structured tables.
  • Editor panels.
  • Status and role badges.
  • Notices, empty states, and danger-zone actions.

AIF Boundary

Batoi AIF is optional and governed by explicit owner configuration.

Configuration:

radpress/config/aif.json

Default behavior and limits:

  • External providers are disabled until configured.
  • The bundled local/offline provider requires no network call.
  • Editor assistance uses bounded context and throttling.
  • Apply and copy actions remain explicit human actions.
  • AIF has no publication authority.
  • Admin can view status at /admin/aif.
  • Guarded content-assist actions at /admin/aif/assist return a disabled response until configured.
  • The admin status screen shows provider availability, feature flags, workspace requirement, and network-call trust boundaries.

Future provider adapters can implement Batoi\Press\Aif\AifProvider. Future Batoi Platform workspace adapters can implement Batoi\Press\Aif\BatoiWorkspaceAifProvider.

Use UIF in a Public Theme

Public theme authors should begin with the Press theme contract, not with a UIF example page. Build the server-rendered landmarks and escaped content first, then use UIF for progressive enhancement.

1. Declare a pinned local UIF stylesheet and script in the theme manifest. 2. Add semantic HTML and UIF classes to layouts and partials. 3. Use data-uif-icon and other declarative attributes only where the page remains understandable without JavaScript. 4. Initialize the theme once after the document is ready. If a widget inserts new markup later, initialize only that widget subtree. 5. Keep theme and widget data bounded and escaped. UIF does not sanitize server data or grant access to Press records. 6. Verify the theme against the upload, preview, accessibility, and recovery steps in Themes.

For implementation examples, use the maintained UIF component examples, icon guide, and tokens and theming guide.