-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
204f345
commit 77a80f4
Showing
1 changed file
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,54 @@ | ||
# @vaadin/text-field | ||
|
||
> ⚠️ Work in progress, please do not use this component yet. | ||
A web component that allows the user to input and edit text. | ||
|
||
The new version of `vaadin-text-field` component using slotted `<input>`. | ||
[Live Demo ↗](https://vaadin.com/docs/latest/ds/components/text-field) | ||
|
||
```html | ||
<vaadin-text-field label="Street Address"></vaadin-text-field> | ||
``` | ||
|
||
## Installation | ||
|
||
Install the component: | ||
|
||
```sh | ||
npm i @vaadin/text-field --save | ||
``` | ||
|
||
Once installed, import the component in your application: | ||
|
||
```js | ||
import '@vaadin/text-field'; | ||
``` | ||
|
||
## Themes | ||
|
||
Vaadin components come with two built-in [themes](https://vaadin.com/docs/latest/ds/customization/using-themes), | ||
Lumo and Material. The [main entrypoint](https://github.com/vaadin/web-components/blob/master/packages/text-field/vaadin-text-field.js) | ||
of the package uses Lumo theme. | ||
|
||
To use the Material theme, import the component from the `theme/material` folder: | ||
|
||
```js | ||
import '@vaadin/text-field/theme/material/vaadin-text-field.js'; | ||
``` | ||
|
||
You can also import the Lumo version of the component explicitly: | ||
|
||
```js | ||
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: | ||
|
||
```js | ||
import '@vaadin/text-field/src/vaadin-text-field.js'; | ||
``` | ||
|
||
## License | ||
|
||
Apache License 2.0 | ||
|
||
Vaadin collects development time usage statistics to improve this product. | ||
For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics. |