---
title: Form elements
description: Form elements structures user inputs with labels, controls, and consistent spacing.
---
## Basics
Wrap the form in `.env-form`.
Each form field combination of text label and form control may optionally be wrapped in
`.env-form-field` for consistent spacing.
The form field wrapper may also contain a help text using `.env-form-field-help`.
```html
```
### Form control container
The class `.env-form-control` creates a multi purpose container used to enhance single form controls.
It can only contain elements of the following types:
- `.env-form-label`
- `.env-form-input`
- `.env-button`
- `.env-icon`
- `[aria-hidden="true"]`
#### Usages
Create an [input group](#input-group) with label, input and button with a combinations of
elements using `.env-form-input`, `.env-button` and `.env-form-label`.
```html
```
[Option elements](#option-elements), such as radio buttons, checkboxes and switches in combination with a label
should use the wrapper for alignment and spacing.
Use the combination of `.env-radio`, `.env-checkbox` or `.env-switch` and `.env-form-label`.
```html
```
Add [icons](#input-icons) to input fields using the combination of `.env-form-input` and `.env-icon`.
```html
```
## Input elements
```html
```
### Search input element
Use `.env-form-input` and `[type="search"]` for search input elements.
Add modifier class `.env-form-input--search` to display a clear button.
```html
```
### Textarea element
Use `.env-form-input` for a textarea element. Add `rows` attribute to specify the number of visible text lines.
The textarea will be resizable vertically.
```html
```
### Contenteditable element
Make sure to add `role="textbox"` and `aria-multiline="true"` to the contenteditable element.
The contenteditable element should also have `aria-label` or `aria-labelledby` attribute since a native label element
is not allowed.
An optional placeholder may be added using attribute `aria-placeholder` on the contenteditable element.
```html
Contenteditable
```
## Select element and component
**Updated in 2025.05.1.**
With the introduction of [Customizable select elements](https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Customizable_select),
both the Select element and the Select component support a progressively enhanced approach that applies
as much of the Envision styling as possible while maintaining native select element functionality.
This feature is opt-in and can be enabled by adding a `button` with a `selectedcontent` tag inside the select element.
### Select component
A `