![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@vaadin/text-field
Advanced tools
@vaadin/text-field is a web component for creating text input fields. It provides a customizable and accessible text input element that can be used in web applications. The package is part of the Vaadin component library, which is designed to work seamlessly with modern web frameworks.
Basic Text Field
This code demonstrates a basic text field with a label. The text field is a simple input element that allows users to enter text.
<vaadin-text-field label="Name"></vaadin-text-field>
Password Field
This code shows how to create a password field using @vaadin/text-field. The password field masks the input to protect sensitive information.
<vaadin-password-field label="Password"></vaadin-password-field>
Text Area
This code demonstrates a text area, which is a multi-line text input field. It is useful for longer text inputs such as comments or descriptions.
<vaadin-text-area label="Description"></vaadin-text-area>
Validation
This code sample shows how to add validation to a text field. The field uses a regular expression pattern to validate email addresses and displays an error message if the input is invalid.
<vaadin-text-field label="Email" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$" error-message="Please enter a valid email address"></vaadin-text-field>
react-text-field is a React component for creating text input fields. It offers similar functionality to @vaadin/text-field but is specifically designed for React applications. It provides customizable input fields with support for validation and styling.
A web component that allows the user to input and edit text.
<vaadin-text-field label="Street Address"></vaadin-text-field>
Install the component:
npm i @vaadin/text-field
Once installed, import the component in your application:
import '@vaadin/text-field';
Vaadin components come with two built-in themes, Lumo and Material. The main entrypoint of the package uses Lumo theme.
To use the Material theme, import the component from the theme/material
folder:
import '@vaadin/text-field/theme/material/vaadin-text-field.js';
You can also import the Lumo version of the component explicitly:
import '@vaadin/text-field/theme/lumo/vaadin-text-field.js';
Finally, you can import the un-themed component from the src
folder to get a minimal starting point:
import '@vaadin/text-field/src/vaadin-text-field.js';
Read the contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
Apache License 2.0
Vaadin collects usage statistics at development time to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.
FAQs
vaadin-text-field
The npm package @vaadin/text-field receives a total of 89,465 weekly downloads. As such, @vaadin/text-field popularity was classified as popular.
We found that @vaadin/text-field demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.