New to Telerik UI for Blazor? Download Free 30-day trial

PromptBox - Modes

Configurator

Mode

  • Modes.razor
Loading the demo source code...please wait.
Style in ThemeBuilder
  • Custom SASS variables
  • Atomic customizations
  • Sharing projects
Start Theming

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.

This Blazor PromptBox Modes example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.

Support & Learning Resources

An error has occurred. This application may no longer respond until reloaded.