# utils/dom/tounit

module

<a id="type-definitions">

## Type Definitions

<a id="typedef-ToUnitHelper">

### `ToUnitHelper`

<a id="functions">

## Functions

<a id="function-toUnit">

### `toUnit( unit ) → ToUnitHelper`

Returns a helper function, which adds a desired trailing `unit` to the passed value.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-utils/src/dom/tounit.ts#L16)

#### Parameters

* `unit: string`

  An unit like "px" or "em".

#### Returns

* `ToUnitHelper`

---

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