# ui/labeledfield/utils

module

<a id="constants">

## Constants

<a id="constant-createLabeledDropdown">

### `createLabeledDropdown: LabeledFieldViewCreator<DropdownView>`

A helper for creating labeled dropdowns.

It creates an instance of a [dropdown](module_ui_dropdown_dropdownview-DropdownView.md) that is logically related to a [labeled field view](module_ui_labeledfield_labeledfieldview-LabeledFieldView.md).

The helper does the following:

* It sets dropdown's `id` and `ariaDescribedById` attributes.
* It binds input's `isEnabled` to the labeled view.

Usage:

```typescript
const labeledInputView = new LabeledFieldView( locale, createLabeledDropdown );
console.log( labeledInputView.fieldView ); // A dropdown instance.
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-ui/src/labeledfield/utils.ts#L192)

<a id="constant-createLabeledInputNumber">

### `createLabeledInputNumber: LabeledFieldViewCreator<InputNumberView>`

A helper for creating labeled number inputs.

It creates an instance of a [input number](module_ui_inputnumber_inputnumberview-InputNumberView.md) that is logically related to a [labeled view](module_ui_labeledfield_labeledfieldview-LabeledFieldView.md) in DOM.

The helper does the following:

* It sets input's `id` and `ariaDescribedById` attributes.
* It binds input's `isReadOnly` to the labeled view.
* It binds input's `hasError` to the labeled view.
* It enables a logic that cleans up the error when user starts typing in the input.

Usage:

```typescript
const labeledInputView = new LabeledFieldView( locale, createLabeledInputNumber );
console.log( labeledInputView.fieldView ); // A number input instance.
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-ui/src/labeledfield/utils.ts#L95)

<a id="constant-createLabeledInputText">

### `createLabeledInputText: LabeledFieldViewCreator<InputTextView>`

A helper for creating labeled inputs.

It creates an instance of a [input text](module_ui_inputtext_inputtextview-InputTextView.md) that is logically related to a [labeled view](module_ui_labeledfield_labeledfieldview-LabeledFieldView.md) in DOM.

The helper does the following:

* It sets input's `id` and `ariaDescribedById` attributes.
* It binds input's `isReadOnly` to the labeled view.
* It binds input's `hasError` to the labeled view.
* It enables a logic that cleans up the error when user starts typing in the input.

Usage:

```typescript
const labeledInputView = new LabeledFieldView( locale, createLabeledInputText );
console.log( labeledInputView.fieldView ); // A text input instance.
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-ui/src/labeledfield/utils.ts#L46)

<a id="constant-createLabeledTextarea">

### `createLabeledTextarea: LabeledFieldViewCreator<TextareaView>`

A helper for creating labeled textarea.

It creates an instance of a [textarea](module_ui_textarea_textareaview-TextareaView.md) that is logically related to a [labeled view](module_ui_labeledfield_labeledfieldview-LabeledFieldView.md) in DOM.

The helper does the following:

* It sets textarea's `id` and `ariaDescribedById` attributes.
* It binds textarea's `isReadOnly` to the labeled view.
* It binds textarea's `hasError` to the labeled view.
* It enables a logic that cleans up the error when user starts typing in the textarea.

Usage:

```typescript
const labeledTextarea = new LabeledFieldView( locale, createLabeledTextarea );
console.log( labeledTextarea.fieldView ); // A textarea instance.
```

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-ui/src/labeledfield/utils.ts#L145)

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
