# PromptBoxBuilder

## Properties

### WriteAction - Func

## Methods

### ActionButton(System.Action)

Configures the Action button (send/stop) in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

#### Parameters

##### configurator - System.Action<[PromptBoxActionButtonSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxactionbuttonsettingsbuilder)>

The configurator for the actionbutton setting.

#### RETURNS

Returns the current instance of [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) .

### Enable(System.Boolean)

If set to false, the widget will be disabled and will not allow user input. The widget is enabled by default and allows user input.

#### Parameters

##### value - `System.Boolean`

The value for Enable

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### EndAffixTemplateHandler(System.String)

Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.When the built-in PromptBox buttons are enabled, the authored end-affix content stays in place and the framework backfills any missing built-in controls after it inside the same end-affix container. To adopt a custom element instead of the default control, include ref-promptbox-send-button, ref-promptbox-file-select-button, or ref-promptbox-speech-to-text-button on the authored element.

#### Parameters

##### templateHandler - `System.String`

The handler that returs the template for EndAffixTemplate

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### EndAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines a custom template for the end affix area. The end affix is positioned after the input field and typically contains action buttons.When the built-in PromptBox buttons are enabled, the authored end-affix content stays in place and the framework backfills any missing built-in controls after it inside the same end-affix container. To adopt a custom element instead of the default control, include ref-promptbox-send-button, ref-promptbox-file-select-button, or ref-promptbox-speech-to-text-button on the authored element.

#### Parameters

##### template - TemplateBuilder\<TModel>

A Template component that configures the endaffixtemplate.

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### FileSelectButton(System.Action)

Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.

#### Parameters

##### configurator - System.Action<[PromptBoxFileSelectButtonSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxfileselectbuttonsettingsbuilder)>

The configurator for the fileselectbutton setting.

#### RETURNS

Returns the current instance of [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) .

### FileSelectButton()

Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.

#### RETURNS

Returns the current instance of [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) .

### FileSelectButton(System.Boolean)

Controls the visibility and configuration of the File Select button in the end affix. When enabled, users can attach files to their prompts.

#### Parameters

##### enabled - `System.Boolean`

Enables or disables the fileselectbutton option.

#### RETURNS

Returns the current instance of [PromptBoxFileSelectButtonSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxfileselectbuttonsettingsbuilder) .

### FillMode(Kendo.Mvc.UI.FillMode)

Defines the fill mode for the PromptBox container.

#### Parameters

##### value - [FillMode](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui/fillmode)

The value for FillMode

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Loading(System.Boolean)

Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.

#### Parameters

##### value - `System.Boolean`

The value for Loading

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Loading()

Sets the loading state of the Action button. When true, the button displays a stop icon and allows users to cancel ongoing generation.

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### MaxTextAreaHeight(System.Double)

Sets the maximum height of the textarea in pixels. The textarea resizes automatically until it reaches this height. When the content exceeds this height, a scrollbar appears.

#### Parameters

##### value - `System.Double`

The value for MaxTextAreaHeight

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Messages(System.Action)

Defines the localization messages for the PromptBox.

#### Parameters

##### configurator - System.Action<[PromptBoxMessagesSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxmessagessettingsbuilder)>

The configurator for the messages setting.

#### RETURNS

Returns the current instance of [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) .

### Mode(Kendo.Mvc.UI.PromptBoxMode)

Sets the mode of the PromptBox. Available options are "single", "multi", and "auto". single - Displays a single-line input field; multi - Displays a multi-line textarea with configurable rows or auto - Starts as a single line and expands automatically as the user types.

#### Parameters

##### value - [PromptBoxMode](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui/promptboxmode)

The value for Mode

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Placeholder(System.String)

Sets the placeholder text displayed in the PromptBox when it is empty.

#### Parameters

##### value - `System.String`

The value for Placeholder

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Readonly(System.Boolean)

Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.

#### Parameters

##### value - `System.Boolean`

The value for Readonly

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Readonly()

Sets the read-only state of the PromptBox. When set to true, the PromptBox content cannot be modified but remains accessible.

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Rows(System.Double)

Sets the number of visible text lines in the textarea. Applies only when the mode is set to "multi".

#### Parameters

##### value - `System.Double`

The value for Rows

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### SpeechToTextButton(System.Action)

Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

#### Parameters

##### configurator - System.Action<[PromptBoxSpeechToTextButtonSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxspeechtotextbuttonsettingsbuilder)>

The configurator for the speechtotextbutton setting.

#### RETURNS

Returns the current instance of [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) .

### SpeechToTextButton(System.Boolean)

Configures the Speech to Text button in the end affix. The button is always visible. When null or not configured, the button is enabled by default. Use { enable: false } to disable it.

#### Parameters

##### enabled - `System.Boolean`

Enables or disables the speechtotextbutton option.

#### RETURNS

Returns the current instance of [PromptBoxSpeechToTextButtonSettingsBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxspeechtotextbuttonsettingsbuilder) .

### StartAffixTemplateHandler(System.String)

Defines a custom template for the start affix area. The start affix is positioned before the input field.

#### Parameters

##### templateHandler - `System.String`

The handler that returs the template for StartAffixTemplate

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### StartAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines a custom template for the start affix area. The start affix is positioned before the input field.

#### Parameters

##### template - TemplateBuilder\<TModel>

A Template component that configures the startaffixtemplate.

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Title(System.String)

Sets the title attribute of the input or textarea element.

#### Parameters

##### value - `System.String`

The value for Title

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### TopAffixTemplateHandler(System.String)

Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only.

#### Parameters

##### templateHandler - `System.String`

The handler that returs the template for TopAffixTemplate

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### TopAffixTemplate(Kendo.Mvc.UI.Fluent.TemplateBuilder)

Defines a custom template for the top affix area. The top affix is positioned at the top of the content area in multi-line mode only.

#### Parameters

##### template - TemplateBuilder\<TModel>

A Template component that configures the topaffixtemplate.

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Value(System.String)

Sets the value of the PromptBox.

#### Parameters

##### value - `System.String`

The value for Value

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

### Events(System.Action)

Configures the client-side events.

#### Parameters

##### configurator - System.Action<[PromptBoxEventBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxeventbuilder)>

The client events action.

#### RETURNS

Returns the current [PromptBoxBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/promptboxbuilder) instance.

#### Example

```
 
            @(Html.Kendo().PromptBox()
                  .Name("PromptBox")
                  .Events(events => events
                      .Blur("onBlur")
                  )
            )
             
```

### ToComponent()

Returns the internal view component.

#### RETURNS

The  instance that represents the component.

### Expression(System.String)

Sets the name of the component.

#### Parameters

##### modelExpression - `System.String`

The name.

#### RETURNS

Returns the current  instance.

### Explorer(Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer)

Sets the name of the component.

#### Parameters

##### modelExplorer - `Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer`

The name.

#### RETURNS

Returns the current  instance.

### Name(System.String)

Sets the name of the component.

#### Parameters

##### componentName - `System.String`

The name.

#### RETURNS

Returns the current  instance.

### Deferred(System.Boolean)

Suppress initialization script rendering. Note that this options should be used in conjunction with Kendo.Mvc.UI.Fluent.WidgetFactory.DeferredScripts(System.Boolean,System.Boolean)

#### Parameters

##### deferred - `System.Boolean`

#### RETURNS

Returns a [DeferredWidgetBuilder](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/deferredwidgetbuilder) instance.

### HtmlAttributes(System.Object)

Sets the HTML attributes.

#### Parameters

##### attributes - `System.Object`

The HTML attributes.

#### RETURNS

Returns the current  instance.

### HtmlAttributes(System.Collections.Generic.IDictionary)

Sets the HTML attributes.

#### Parameters

##### attributes - `System.Collections.Generic.IDictionary<String,Object>`

The HTML attributes.

#### RETURNS

Returns the current  instance.

### ScriptAttributes(System.Object,System.Boolean)

Sets the JavaScript attributes to the initialization script.

#### Parameters

##### attributes - `System.Object`

The JavaScript attributes.

##### overrideAttributes - `System.Boolean`

Argument which determines whether attributes should be overriden.

#### RETURNS

Returns the current  instance.

### ScriptAttributes(System.Collections.Generic.IDictionary,System.Boolean)

Sets the JavaScript attributes to the initialization script.

#### Parameters

##### attributes - `System.Collections.Generic.IDictionary<String,Object>`

The JavaScript attributes.

##### overrideAttributes - `System.Boolean`

Argument which determines whether attributes should be overriden.

#### RETURNS

Returns the current  instance.

### Render()

Renders the component in place.

### ToHtmlString()

Returns the HTML representation of the component.

### WriteTo(System.IO.TextWriter,System.Text.Encodings.Web.HtmlEncoder)

#### Parameters

##### writer - `System.IO.TextWriter`

##### encoder - `System.Text.Encodings.Web.HtmlEncoder`

### ToClientTemplate()

Returns the client template for the component.

### AsModule(System.Boolean)

Specifies whether the initialization script of the component will be rendered as a JavaScript module.

#### Parameters

##### value - `System.Boolean`

#### RETURNS

Returns the current  instance.
