New to Telerik UI for Blazor? Download Free 30-day trial
PromptBox - Modes
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
Mode
Auto- Modes.razor
Description
The Telerik UI for Blazor PromptBox supports three distinct rendering modes that control how the input area behaves and responds to user content.
The Auto mode (default) provides the most flexible experience - it starts as a single-line input and automatically transitions to multi-line when content overflows. As users continue typing, the text area grows vertically up to the defined MaxTextAreaHeight, after which scrolling is enabled. This mode intelligently adapts to user needs without requiring manual intervention.
The Single Line mode maintains a consistent, compact appearance with a fixed height. When content exceeds the available width, horizontal scrolling is enabled, making it ideal for short messages or constrained UI spaces where vertical expansion is not desired.
The Multi Line mode provides a vertical text area from the start, defaulting to three lines of height. The area expands vertically as users add more content, up to the specified MaxTextAreaHeight, after which vertical scrolling becomes available. This mode is perfect for scenarios where longer-form content is expected.
Use the configurator in this demo to switch between modes and observe how the PromptBox adapts its rendering and behavior. Each mode maintains full functionality including file selection, action buttons, and template support, while providing different user experiences optimized for specific use cases.