API Reference

Python API

Core Schema

Components (Nodes)

UI components are represented as nodes in the schema. Each node has a unique id and specific props.

Component Props

Each component has specific props that define its appearance and behavior.

Events and Actions

Events connect user interactions to actions.

Structure

Enums

TypeScript API

The TypeScript API is available through the following packages:

  • @promptius-gui/core - Core UI factory and rendering engine

  • @promptius-gui/schemas - Type definitions and Zod schemas

  • @promptius-gui/material-ui - Material UI adapter

  • @promptius-gui/chakra-ui - Chakra UI adapter

  • @promptius-gui/ant-design - Ant Design adapter

Core Package

The core package provides the main UIFactory component:

import UIFactory from '@promptius-gui/core';
import { PromptiusGUISchema } from '@promptius-gui/schemas';

<UIFactory schema={schema} />

Schemas Package

The schemas package provides TypeScript type definitions and Zod validation schemas:

import { PromptiusGUISchema } from '@promptius-gui/schemas';
import { promptiusGuiSchema } from '@promptius-gui/schemas/zod';

// Type-safe schema
const schema: PromptiusGUISchema = { ... };

// Runtime validation
const validated = promptiusGuiSchema.parse(schema);