API Reference

Public Utilities ​

Import from @verbb/plugin-kit-react/utils (src/utils/index.ts).

This surface is intentionally small: app configuration, the Craft host bridge, class merging, and translation setters. Schema/validation helpers live in the form engine packages, not here.

Classes / styling ​

SymbolNotes
cnclsx + tailwind-merge helper for combining class names.

App configuration ​

SymbolNotes
PluginKitProvider, usePluginKitConfigProvider-based config for a React tree (preferred).
configure / configurePluginKitReactImperative config — secondary mounts (e.g. slots in the Craft control panel interface).
mountShadowAppShadow-root mount helper (re-export of the @verbb/plugin-kit-web implementation).
createCraftHostBridgeCraft CP bridge factory for hostBridge.
PluginKitReactConfig, PluginKitProviderProps, TranslateFunction, MountShadowAppOptions, ShadowAppMountTypes.

See React App APIs for usage.

Host bridge ​

Re-exported from @verbb/plugin-kit-core:

SymbolNotes
setHostBridge, getHostBridgeMerge / read the global bridge.
hostRequest, hostOpenElementSelector, hostFormatDate, hostGetTimepickerOptions, hostGetLocaleCall through the configured bridge.
HostRequestMethod, HostRequestConfig, HostElementSelectorOptions, HostSelectedElement, PluginKitHostBridgeTypes.

Portals (legacy compatibility) ​

Overlays (dialogs, popovers, selects) render through the native Popover API top layer — they are not reparented into a portal node, and portalClassName is deprecated and ignored.

Two portal-adjacent settings still matter, and both are handled by PluginKitProvider / configurePluginKitReact:

  • portalContainer — pass the ShadowRoot from mountShadowApp so overlay scroll-lock keeps the document gutter stable in embedded hosts (Craft CP).
  • shadowRootSelectors — selectors used to scope overlay scroll-lock inside shadow roots.

The low-level getters/setters (setPortalClassName, getPortalClassName, setPortalContainer, getPortalContainer, getPortalMountNode, getPortalTargetForAppend, PortalContainer) remain exported from @verbb/plugin-kit-core for compatibility, but new code should not need them.

Translation ​

Re-exported from @verbb/plugin-kit-forms:

SymbolNotes
setTranslationCategory, setTranslateFunction, translateCP / test overrides.
TranslateParamsString map type.

Prefer configuring these through PluginKitProvider (translationCategory / translate props).

Where did the schema helpers go? ​

Earlier versions re-exported schema/validation helpers (evaluateCondition, traverseSchema, createSchemaFieldIndex, validateFormValues, …) from this barrel. They now live inside the framework-agnostic form engine package and are consumed internally by SchemaForm — they are no longer part of the public React surface. Use the SchemaForm engine (Forms API reference) for validation, or hand-roll checks in bespoke forms.

Rich-text, time-option, handle, and store helpers from v1 are no longer part of the public React surface.

Example ​

ts
import {
  cn,
  configurePluginKitReact,
  createCraftHostBridge,
  hostRequest,
} from '@verbb/plugin-kit-react/utils';
Edit this page
Last updated: Sep 15, 2026, 1:09 PM