Blazor PromptBox - Overview
- EXAMPLE
- VIEW SOURCE
- EDIT IN TELERIK REPL
- Change Theme
default
- Overview.razor
The PromptBox component is part of Telerik UI for Blazor, a professional grade UI library with 110+ native components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
Description
The Telerik UI for Blazor PromptBox component provides a modern input interface for composing messages and prompts in chat and AI-driven applications. It combines text input, file attachment capabilities, and action buttons into a single, seamless user experience.
The PromptBox features three built-in rendering modes to adapt to different content needs: Auto mode automatically transitions from single-line to multi-line input as content grows, Single Line mode maintains a fixed height with horizontal scrolling, and Multi Line mode provides a vertical text area that expands with content. The component intelligently adjusts its layout based on the selected mode and content length.
This demo showcases the PromptBox integrated within a chat-like interface. The component includes file selection capabilities through the EnableFileSelect parameter, customizable placeholder text, and an action button that triggers when users submit their input. The MaxTextAreaHeight parameter controls how tall the input area can grow before scrolling becomes necessary.
The PromptBox supports prefix and suffix templates through PromptBoxStartAffixTemplate and PromptBoxEndAffixTemplate, allowing you to add custom icons, buttons, or other UI elements. The component fires the OnPromptAction event when users submit their input, enabling seamless integration with your application's message handling logic.