New to KendoReactStart a free 30-day trial

AIPromptProps
Premium

Props of the AIPrompt component.

NameTypeDefaultDescription

activeView

string

Sets the name of the activeView property:

jsx
<AIPrompt activeView="promptView" />

children?

React.ReactNode

Custom content rendered inside the component.

jsx
<AIPrompt>
  <div>Custom content</div>
</AIPrompt>

dir?

string

Text direction of the component.

jsx
<AIPrompt dir="rtl" />

loading?

boolean

Indicates loading state of the prompt.

jsx
<AIPrompt loading={true} />

onActiveViewChange?

(name: string) => void

Fires when the active view changes. Provides the new view name.

jsx
<AIPrompt onActiveViewChange={(name) => console.log('Active view changed to:', name)} />

onCancel?

() => void

Fires when the prompt is canceled.

jsx
<AIPrompt onCancel={() => console.log('Prompt cancelled')} />

onCommandExecute?

(command: CommandInterface) => void

Fires when a command is executed.

jsx
<AIPrompt onCommandExecute={(command) => console.log('Command executed:', command)} />

onPromptRequest?

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

Fires when a prompt is requested. Provides the prompt and optional target output.

jsx
<AIPrompt onPromptRequest={(prompt) => console.log('Prompt requested:', prompt)} />

outputs?

AIPromptOutputInterface[]

Output items generated from prompts.

jsx
<AIPrompt outputs={[{ id: 1, responseContent: 'Generated content' }]} />

promptPlaceholder?

string

Placeholder text for the prompt input.

jsx
<AIPrompt promptPlaceholder="Type your prompt here..." />

streaming?

boolean

Indicates streaming state of the prompt.

jsx
<AIPrompt streaming={true} />

style?

React.CSSProperties

Inline styles for the root element.

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

suggestionsView?

SuggestionsView

Optionally specifies the rendering for the suggestions displayed in the AI Prompt component.

toolbarItems?

ReactNode | AIPromptToolbarItemInterface[]

Items rendered in the toolbar. The items rendered in the toolbar. the toolbarItems property:

jsx
<AIPrompt toolbarItems={[<CustomToolbarItem />]} />
Not finding the help you need?
Contact Support