Hiyve Components - v1.0.0
    Preparing search index...
    interface AIMagicActionProps {
        category?: string;
        colors?: AIMagicActionColors;
        disabled?: boolean;
        editor: Editor | null;
        iconOnly?: boolean;
        labels?: Partial<AIMagicActionLabels>;
        onTransform: (
            args: { prompt: AIPromptTemplate; text: string },
        ) => Promise<string> | Promise<AIMagicTransformResult>;
        prompts: AIPromptTemplate[];
        sx?: SxProps<Theme>;
    }
    Index

    Properties

    category?: string

    Optional category filter. When set, only prompts whose category matches (or is undefined) are shown.

    Override colours.

    disabled?: boolean

    Disable the toolbar button entirely.

    editor: Editor | null

    TipTap editor instance the action operates on. null (e.g. before the editor has initialised) renders the button in a disabled state — clicking is a no-op.

    iconOnly?: boolean

    Render only the icon (no label). Defaults to true since the button typically lives in a dense formatting toolbar.

    labels?: Partial<AIMagicActionLabels>

    Override labels (i18n).

    onTransform: (
        args: { prompt: AIPromptTemplate; text: string },
    ) => Promise<string> | Promise<AIMagicTransformResult>

    Async hook into the host's AI backend. Receives the input text and the chosen prompt; returns the model's output. Throw or reject to surface an error in the popover.

    prompts: AIPromptTemplate[]

    Available prompt templates. The component filters by category when provided. Hosts typically pass presets + the current teacher's custom templates, merged.

    sx?: SxProps<Theme>

    MUI sx applied to the toolbar button.