PromptBox Modes
The PromptBox supports three modes that determine the number of lines displayed in the input area—single-line, multi-line, and auto.
These PromptBox modes control the layout and behavior of the input area to suit various use cases and user preferences. You can set the desired mode using the mode option of the PromptBox.
Single-Line Mode
To enable single-line mode, set the mode option to "single". When the text exceeds the width of the input area, horizontal scrolling is enabled to allow users to view and edit their entire prompt.
$("#promptbox").kendoPromptBox({
mode: "single"
});
Multi-Line Mode
To enable multi-line mode, set the mode option to "multi". You can set the number of visible text lines using the rows option or use maxTextAreaHeight to limit the maximum height of the input area.
$("#promptbox").kendoPromptBox({
mode: "multi",
rows: 4
});
Auto Mode
To enable auto mode, set the mode option to "auto". This automatically transforms the PromptBox from single-line to multi-line mode based on the content. You can also set a maximum height for the input area using the maxTextAreaHeight option to prevent it from growing indefinitely.
$("#promptbox").kendoPromptBox({
mode: "auto",
maxTextAreaHeight: 200
});