--- title: Text Input desc: Text Input is a simple input field. layout: components classnames: component: - class: input desc: For tag or a wrapper of tag style: - class: input-ghost desc: ghost style color: - class: input-neutral desc: neutral color - class: input-primary desc: primary color - class: input-secondary desc: secondary color - class: input-accent desc: accent color - class: input-info desc: info color - class: input-success desc: success color - class: input-warning desc: warning color - class: input-error desc: error color size: - class: input-xs desc: Extra small size - class: input-sm desc: Small size - class: input-md desc: Medium size default: true - class: input-lg desc: Large size - class: input-xl desc: Extra large size --- ### ~Text input ```html ``` ### ~Text input with text label inside #### We can use input class for the parent and put anything inside it
```html ``` ### ~Ghost style ```html ``` ### ~With fieldset and fieldset-legend
What is your name?

Optional

```html
What is your name?

Optional

``` ### ~Input colors
```html ``` ### ~Sizes
```html ``` ### ~Disabled ```html ``` ## Input types `input` class can be used for any input field type. Including `text`, `password`, `email`, `number`, `date`, `datetime-local`, `week`, `month`, `tel`, `url`, `search`, `time` For `checkbox`, `radio`, `file`, `range` use their own class names, as they are not visually input fields. Inputs can be used with `validator` class to have validation styles. [See Validator component](/components/validator/) for more details. ### ~Text input with data list suggestion ```html ``` ### ~Date input ```html ``` ### ~Time input ```html ``` ### ~datetime-local input ```html ``` ### ~Username text input with icon and validator

Must be 3 to 30 characters
containing only letters, numbers or dash

```html

Must be 3 to 30 characters
containing only letters, numbers or dash

``` ### ~Search input with icon
```html ``` ### ~Email input with icon and validator
```html ``` ### ~Email input with icon, validator, button, join
```html
``` ### ~Password input with icon and validator
```html ``` ### ~Number input with validator

Must be between be 1 to 10

```html

Must be between be 1 to 10

``` ### ~Telephone number input with icon and validator

Must be 10 digits

```html

Must be 10 digits

``` ### ~URL with icon and validator

Must be valid URL

```html

Must be valid URL

```