Skip to content

createUIPlugin

createUIPlugin(config): UIPlugin

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

Creates a UIPlugin that maps component slots to styled implementations.

Slots not provided in the components map fall back to the unstyled HTML defaults from the headless layer. This allows incremental adoption — implement only the slots your design system covers.

Plugin configuration object.

Partial<UIPluginComponents>

Partial map of slot names to styled component implementations. See UIPluginComponents for available slots.

UIPlugin

A UIPlugin instance to pass to UIPluginProvider.

import { createUIPlugin } from "@cfast/ui";
const joyPlugin = createUIPlugin({
components: {
button: JoyButton,
table: JoyTable,
chip: JoyChip,
},
});