Blazor PromptBox - Overview

  • Overview.razor
Loading the demo source code...please wait.
Style in ThemeBuilder
  • Custom SASS variables
  • Atomic customizations
  • Sharing projects
Start Theming
blazor ui ninja image

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.

This Blazor PromptBox Overview 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

Additional Resources

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