Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Sep 25, 2021
1 parent 204f345 commit 77a80f4
Showing 1 changed file with 51 additions and 2 deletions.
53 changes: 51 additions & 2 deletions packages/text-field/README.md
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.

0 comments on commit 77a80f4

Please sign in to comment.