Trusted by the world’s leading companies
Overview
The Angular TextBox (text field) is a component for editing, displaying, or entering plain text on forms to capture user names, phone numbers, email addresses, and more. This component is an extended version of the HTML5 TextBox (input type text) component with icons, floating labels, different sizes, grouping, validation states, and more features. It is available in a HTML5/CSS version and JavaScript version.
Angular TextBox
This component provides a floating label with minimal configuration. It supports most of the features that are available in the pure HTML5/CSS version of the TextBox component.
HTML5/CSS TextBox
Render a simple text box using pure CSS and HTML. The component supports all the essential features, such as input groups with icons, floating labels, multiline text, different sizing, and validation states.
Input group
Easily create input groups by prepending or appending icons, buttons, or text with floating labels in the TextBox component. For example, you can prepend text with a dollar symbol ($) for price input or an at sign (@) for username.
Floating label (placeholder text)
Float placeholder text at the top of the input box with an animation when the input receives focus or has a value. The floating label ensures that the input value and label are always visible.
Input sizing
The TextBox has built-in sizing support (normal and small modes) to fit the input box’s size with sufficient padding and spacing.
Input validation with Angular forms
The component works seamlessly with Angular template-driven forms, reactive forms, and native HTML forms. It also supports applying corresponding validation styles for success, error, and warning states.
Multiline TextBox
The TextBox component is capable of handling multiple lines of text with floating labels to help you accept addresses, descriptions, comments, feedback, and more.
Get and set text box values
Easily set or retrieve a value in the Angular TextBox component to process it and enable a clear button to allow users reset the input value.
Adornments
The TextBox control supports custom adornments using the prependTemplate and appendTemplate properties, which allow users to render custom elements like icons, buttons, or dropdowns to enhance user interaction with prefix and suffix elements.
Right-to-left (RTL) rendering
The Angular TextBox supports right-to-left (RTL) rendering. Users can change the text direction and layout of the TextBox to be right to left. This improves the user experience and accessibility for those working with RTL languages.
Themes
The Angular TextBox component has several built-in themes: Material, Bootstrap, Fabric (Office 365), Tailwind CSS, and high contrast. Users can customize these built-in themes or create new themes either by overriding Sass variables or using our Theme Studio application.
Developer-friendly APIs
Developers can control the appearance and behaviors of the Angular TextBox component, including its floating label, using a rich set of APIs.
Angular TextBox code example
Easily get started with the Angular TextBox using a few simple lines of HTML and TS code, as demonstrated below. Also, explore the Angular TextBox example, which shows how to render and configure the TextBox in Angular.
<ejs-textbox placeholder="First Name" floatLabelType="Auto"></ejs-textbox>import { Component } from '@angular/core';
@Component({
selector: 'app-root',
// specifies the template string for the TextBox component.
template: `<ejs-textbox placeholder="First Name" floatLabelType="Auto"></ejs-textbox>`
})
export class AppComponent { }Other supported frameworks
The TextBox is also available for the Blazor, React, Vue, and JavaScript frameworks. Check out its platform-specific options in these links:
Not sure how to create your first Angular TextBox? Our documentation can help.
I’d love to read it now.145+ ANGULAR UI COMPONENTS
Frequently Asked Questions
Why should you choose Syncfusion’s Angular TextBox?
The Syncfusion Angular TextBox lets users:
- Use this extended version of the HTML input element, supporting both pure CSS and pure JavaScript versions.
Easily create input groups with icons, buttons, help text, and validation messages.
- Choose from standard Syncfusion themes, including Bootstrap v5 and Tailwind CSS.
- Add a modern look to text and display floating labels using Angular.
Adjust the input size and use multiline mode.
Enjoy simple configuration and APIa.
- Use the control in all modern browsers with ease.
- Utilize a touch-friendly and responsive UI.
Take advantage of extensive demos and documentation to get started quickly with the component.
Where can I find the Syncfusion Angular TextBox demo?
You can find our Angular TextBox demo here. It demonstrates how to render and configure the TextBox.
Can I download and utilize the Syncfusion Angular TextBox for free?
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
How do I get started with the Syncfusion Angular TextBox?
A good place to start would be our comprehensive getting started documentation.
Our Customers Love Us
Awards
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion® is proud to hold the following industry awards.