FGUI.theme
register(theme), apply(name, options), clear(options), preview(name), clearPreview(), list(), get(root).
Most FG UI behaviour initialises automatically through fgui.js. Use the public API when your application injects dynamic content or needs direct control of supported stateful components.
The existing 1.1 top-level API remains supported. 1.2 adds namespaced capabilities rather than replacing those methods.
FGUI.themeregister(theme), apply(name, options), clear(options), preview(name), clearPreview(), list(), get(root).
FGUI.readersetTextSize(target, size, options), getTextSize(target), and the read-only sizes list.
Reader size values: small, normal, medium, large and xlarge.
This page is built entirely with FG UI using the same components, layout primitives, icons and interactions available in the kit. No Bootstrap, Tailwind or external UI framework is required.
FGUI.init(root)Initialise or normalise FG UI behaviour inside a document or newly injected root. Repeated calls are designed to be safe.
FGUI.init(document.querySelector('#ajax-content'));FGUI.open(target)Open supported overlays, modals, drawers, lightboxes, custom selects and applicable picker components.
FGUI.open('#settings-modal');FGUI.close(target)Close a supported FG UI stateful component.
FGUI.close('#settings-modal');FGUI.toggle(target)Toggle a supported component between open and closed states.
FGUI.toggle('#account-drawer');FGUI.toast(message, options)Create a temporary FG UI notification with optional detail, icon and duration.
FGUI.toast('Upload complete', {
detail: 'Your file is ready.',
icon: 'success-circle',
duration: 4000
});FGUI.icon(name, options)Create an SVG element using the local FG UI icon sprite.
const icon = FGUI.icon('search');FGUI.configure(options)Set runtime locale and generated UI strings.
FGUI.configure({
locale: 'fr-FR',
strings: {
chooseDate: 'Choisir une date',
noMatchingOptions: 'Aucune option correspondante'
}
});FGUI.getLocale() returns the active runtime locale. FGUI.t(key, replacements, fallback) returns a configured generated-UI string.
FGUI.t('selectedCount', { count: 3 });Interactive components use explicit data-fgui-* hooks. Use normal FG UI markup first, then call the API when application code needs to initialise or control dynamic content.
data-fgui-gallery, stage and thumbnail hooksdata-fgui-accordion-triggerdata-fgui-sortabledata-fgui-repeatabledata-fgui-popover-targetFG UI 1.2.0 preserves all 393 published 1.1 component-family roots and the existing nine public top-level JavaScript methods, while adding the theme and reader namespaces plus 64 backwards-compatible component families.