Skip to content

useUIPlugin

useUIPlugin(): UIPlugin | null

Defined in: packages/ui/src/plugin.tsx:93

Returns the current UIPlugin from React context.

Returns null if no UIPluginProvider is present in the component tree. Most consumers should use useComponent instead, which handles the fallback to headless defaults automatically.

UIPlugin | null

The active UIPlugin, or null if no provider is mounted.

const plugin = useUIPlugin();
if (plugin?.components.button) {
// A custom button implementation is available
}