New to KendoReactStart a free 30-day trial

InlineAIPromptProps
Premium

NameTypeDefaultDescription

anchor?

"null" | HTMLElement

The element that serves as an anchor for the popup.

animate?

boolean | PopupAnimation

true

Controls the animation of the popup.

appendTo?

HTMLElement

The container element where the popup will be rendered. If not specified, the popup will be rendered in the document body.

commands?

CommandInterface[]

The collection of commands that will be rendered in the context menu. If not specified, default AI text editing commands will be used.

enableSpeechToText?

boolean | SpeechToTextButtonProps

false

Show speech to text button in input. When true, shows the button with default settings. When an object is provided, passes those props directly to the SpeechToTextButton component.

generateButton?

CustomComponent<ButtonProps>

Accepts a custom component that can be used to render the generate button.

height?

string | number

The height of the component.

onClose?

(event: { target: any; }) => void

Fires when the popup is closed.

onCommandExecute?

(command: CommandItemInterface) => void

Fires when a command from the context menu is executed. Exposes the selected command and current prompt value as event data.

onCopy?

(output: InlineAIPromptOutputInterface) => void

Fires each time the user clicks Copy button in the card.

onDiscard?

(output: InlineAIPromptOutputInterface) => void

Fires each time the user clicks Discard button in the card.

onOpen?

(event: { target: any; }) => void

Fires when the popup is opened.

onOutputAction?

(command: OutputActionInterface, output: InlineAIPromptOutputInterface) => void

Fires when an action command is executed. Built-in actions (copy, discard) are handled internally by the component. All other actions are handled by this callback.

onPromptCancel?

() => void

Specifies the callback for cancel action.

onPromptRequest?

(prompt: string, outputItem?: InlineAIPromptOutputInterface) => void

Callback when user submits a prompt

outputActions?

OutputActionInterface[]

The collection of output actions that will be rendered in the card actions. If not specified, default actions (copy, discard) will be used. You can override built-in actions.

outputCard?

AIPromptCardInterface

Represents a template that allows you to define custom Card fields for: header, body, actions The custom fields will override the default one.

outputs?

InlineAIPromptOutputInterface[]

The collection of outputs to display as cards

popupOptions?

PopupProps

Object which passes props directly to the Popup component.

promptInput?

CustomComponent<TextAreaProps>

Accepts a custom component that can be used to render the prompt input.

promptPlaceholder?

string

Placeholder text for the prompt input

promptValue?

string

The initial value of the prompt input

show?

boolean

false

Controls the visibility of the popup.

streaming?

boolean

Specifies if the content is being streamed.

style?

React.CSSProperties

Example usage of the style property:

jsx
<InlineAIPrompt style={{ backgroundColor: 'lightblue' }} />

width?

string | number

The width of the component.

Not finding the help you need?
Contact Support