---
title: "StatusBar"
---
# StatusBar

Defined in: [src/modules/status-bar/status-bar.ts:28](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L28)

The base class of all Jodit UI components. Provides work with a life cycle.

## Extends

- [`Mods`](./traits.Mods.html).[`Elms`](./traits.Elms.html).[`ViewComponent`](./component.ViewComponent.html)\<[`IJodit`](../interfaces/types.IJodit.html)\>

## Implements

- [`IStatusBar`](../interfaces/types.IStatusBar.html)

### Constructor

**new StatusBar**(`jodit`, `target`): `StatusBar`

Defined in: [src/modules/status-bar/status-bar.ts:104](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L104)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `jodit` | [`IJodit`](../interfaces/types.IJodit.html) |
| `target` | [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) |

#### Returns

`StatusBar`

#### Inherited from

[`Mods`](./traits.Mods.html).[`constructor`](./traits.Mods.html#constructor)

### STATUSES

`static` **STATUSES**: `object`

Defined in: [src/core/component/component.ts:40](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L40)

#### beforeInit

`readonly` **beforeInit**: `"beforeInit"` = `'beforeInit'`

#### ready

`readonly` **ready**: `"ready"` = `'ready'`

#### beforeDestruct

`readonly` **beforeDestruct**: `"beforeDestruct"` = `'beforeDestruct'`

#### destructed

`readonly` **destructed**: `"destructed"` = `'destructed'`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`STATUSES`](./component.ViewComponent.html#statuses)

***

### async

**async**: [`IAsync`](../interfaces/types.IAsync.html)

Defined in: [src/core/component/component.ts:44](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L44)

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`async`](../interfaces/types.IStatusBar.html#async)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`async`](./component.ViewComponent.html#async)

***

### uid

`readonly` **uid**: `string`

Defined in: [src/core/component/component.ts:59](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L59)

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`uid`](../interfaces/types.IStatusBar.html#uid)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`uid`](./component.ViewComponent.html#uid)

***

### ownerWindow

**ownerWindow**: [`Window`](https://developer.mozilla.org/docs/Web/API/Window) = `window`

Defined in: [src/core/component/component.ts:109](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L109)

The window in which jodit was created

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`ownerWindow`](../interfaces/types.IStatusBar.html#ownerwindow)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`ownerWindow`](./component.ViewComponent.html#ownerwindow)

***

### jodit

**jodit**: [`IJodit`](../interfaces/types.IJodit.html)

Defined in: [src/core/component/view-component.ts:22](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L22)

Parent View element

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`jodit`](./component.ViewComponent.html#jodit)

***

### container

`readonly` **container**: [`HTMLDivElement`](https://developer.mozilla.org/docs/Web/API/HTMLDivElement)

Defined in: [src/modules/status-bar/status-bar.ts:37](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L37)

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`container`](../interfaces/types.IStatusBar.html#container)

***

### mods

`readonly` **mods**: [`IDictionary`](../modules/types.html#idictionary)\<[`ModType`](../modules/types.html#modtype)\> = `{}`

Defined in: [src/modules/status-bar/status-bar.ts:60](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L60)

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`mods`](../interfaces/types.IStatusBar.html#mods)

#### Inherited from

[`Mods`](./traits.Mods.html).[`mods`](./traits.Mods.html#mods)

***

### target

`readonly` **target**: [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)

Defined in: [src/modules/status-bar/status-bar.ts:106](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L106)

#### Get Signature

**get** **componentName**(): `string`

Defined in: [src/core/component/component.ts:46](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L46)

##### Returns

`string`

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`componentName`](../interfaces/types.IStatusBar.html#componentname)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`componentName`](./component.ViewComponent.html#componentname)

***

#### Get Signature

**get** **ownerDocument**(): [`Document`](https://developer.mozilla.org/docs/Web/API/Document)

Defined in: [src/core/component/component.ts:95](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L95)

The document in which jodit was created

##### Returns

[`Document`](https://developer.mozilla.org/docs/Web/API/Document)

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`ownerDocument`](../interfaces/types.IStatusBar.html#ownerdocument)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`ownerDocument`](./component.ViewComponent.html#ownerdocument)

***

#### Get Signature

**get** **od**(): [`Document`](https://developer.mozilla.org/docs/Web/API/Document)

Defined in: [src/core/component/component.ts:102](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L102)

Shortcut for `this.ownerDocument`

##### Returns

[`Document`](https://developer.mozilla.org/docs/Web/API/Document)

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`od`](../interfaces/types.IStatusBar.html#od)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`od`](./component.ViewComponent.html#od)

***

#### Get Signature

**get** **ow**(): [`Window`](https://developer.mozilla.org/docs/Web/API/Window)

Defined in: [src/core/component/component.ts:110](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L110)

##### Returns

[`Window`](https://developer.mozilla.org/docs/Web/API/Window)

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`ow`](../interfaces/types.IStatusBar.html#ow)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`ow`](./component.ViewComponent.html#ow)

***

#### Get Signature

**get** **isReady**(): `boolean`

Defined in: [src/core/component/component.ts:145](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L145)

Component is ready for work

##### Returns

`boolean`

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`isReady`](../interfaces/types.IStatusBar.html#isready)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`isReady`](./component.ViewComponent.html#isready)

***

#### Get Signature

**get** **isDestructed**(): `boolean`

Defined in: [src/core/component/component.ts:152](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L152)

Component was destructed

##### Returns

`boolean`

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`isDestructed`](../interfaces/types.IStatusBar.html#isdestructed)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`isDestructed`](./component.ViewComponent.html#isdestructed)

***

#### Get Signature

**get** **isInDestruct**(): `boolean`

Defined in: [src/core/component/component.ts:160](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L160)

The component is currently undergoing destructuring or has already been destroyed.
Those. you should not the app froze new events on him now or do anything else with him.

##### Returns

`boolean`

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`isInDestruct`](../interfaces/types.IStatusBar.html#isindestruct)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`isInDestruct`](./component.ViewComponent.html#isindestruct)

***

#### Get Signature

**get** **componentStatus**(): [`ComponentStatus`](../modules/types.html#componentstatus)

Defined in: [src/core/component/component.ts:210](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L210)

Current component status

##### Returns

[`ComponentStatus`](../modules/types.html#componentstatus)

#### Set Signature

**set** **componentStatus**(`componentStatus`): `void`

Defined in: [src/core/component/component.ts:217](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L217)

Setter for current component status

##### Parameters

| Parameter | Type |
| ------ | ------ |
| `componentStatus` | [`ComponentStatus`](../modules/types.html#componentstatus) |

##### Returns

`void`

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`componentStatus`](../interfaces/types.IStatusBar.html#componentstatus)

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`componentStatus`](./component.ViewComponent.html#componentstatus)

***

#### Get Signature

**get** **j**(): `T`

Defined in: [src/core/component/view-component.ts:27](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L27)

Shortcut for `this.jodit`

##### Returns

`T`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`j`](./component.ViewComponent.html#j)

***

#### Get Signature

**get** **defaultTimeout**(): `number`

Defined in: [src/core/component/view-component.ts:31](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L31)

##### Returns

`number`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`defaultTimeout`](./component.ViewComponent.html#defaulttimeout)

***

#### Get Signature

**get** **isShown**(): `boolean`

Defined in: [src/modules/status-bar/status-bar.ts:56](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L56)

Status bar is shown

##### Returns

`boolean`

#### Implementation of

[`IStatusBar`](../interfaces/types.IStatusBar.html).[`isShown`](../interfaces/types.IStatusBar.html#isshown)

#### Call Signature

**getFullElName**(`elementName`): `string`

Defined in: [src/core/component/component.ts:65](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L65)

Calc BEM element class name

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `elementName` | `string` | element name in the bem classification |

##### Returns

`string`

##### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`getFullElName`](./component.ViewComponent.html#getfullelname)

#### Call Signature

**getFullElName**(`elementName`, `mod`): `string`

Defined in: [src/core/component/component.ts:66](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L66)

Calc BEM element class name

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `elementName` | `string` | element name in the bem classification |
| `mod` | `string` | - |

##### Returns

`string`

##### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`getFullElName`](./component.ViewComponent.html#getfullelname)

#### Call Signature

**getFullElName**(`elementName`, `mod`, `modValue`): `string`

Defined in: [src/core/component/component.ts:67](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L67)

Calc BEM element class name

##### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `elementName` | `string` | element name in the bem classification |
| `mod` | `string` | - |
| `modValue` | `string` \| `boolean` | - |

##### Returns

`string`

##### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`getFullElName`](./component.ViewComponent.html#getfullelname)

***

### get()

**get**\<`T`\>(`chain`, `obj?`): [`Nullable`](../modules/types.html#nullable)\<`T`\>

Defined in: [src/core/component/component.ts:138](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L138)

Safe get any field

#### Type Parameters

| Type Parameter |
| ------ |
| `T` |

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `chain` | `string` | the path to be traversed in the obj object |
| `obj?` | [`IDictionary`](../modules/types.html#idictionary) | the object in which the value is searched |

#### Returns

[`Nullable`](../modules/types.html#nullable)\<`T`\>

#### Example

```js
private a = {
  b: {
    c: {
      e: {
        g: {
          color: 'red'
        }
      }
    }
  }
}

this.get('a.b.c.e.g.color'); // Safe access to color
// instead using optionsl chaining
this?.a?.b?.c?.e?.g?.color
```

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`get`](./component.ViewComponent.html#get)

***

### bindDestruct()

**bindDestruct**(`component`): `this`

Defined in: [src/core/component/component.ts:170](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L170)

Bind destructor to some View

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `component` | [`IComponent`](../interfaces/types.IComponent.html) |

#### Returns

`this`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`bindDestruct`](./component.ViewComponent.html#binddestruct)

***

### setStatus()

**setStatus**(`componentStatus`): `void`

Defined in: [src/core/component/component.ts:226](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L226)

Set component status

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `componentStatus` | [`ComponentStatus`](../modules/types.html#componentstatus) | component status |

#### Returns

`void`

#### See

ComponentStatus

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`setStatus`](./component.ViewComponent.html#setstatus)

***

### hookStatus()

**hookStatus**(`status`, `callback`): `void`

Defined in: [src/core/component/component.ts:265](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L265)

Adds a handler for changing the component's status

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `status` | [`ComponentStatus`](../modules/types.html#componentstatus) | the status at which the callback is triggered |
| `callback` | (`component`) => `void` | a function that will be called when the status is `status` |

#### Returns

`void`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`hookStatus`](./component.ViewComponent.html#hookstatus)

***

### isInstanceOf()

`static` **isInstanceOf**\<`T`\>(`c`, `constructorFunc`): `c is T`

Defined in: [src/core/component/component.ts:283](https://github.com/xdan/jodit/blob/main/src/core/component/component.ts#L283)

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`Component`](./component.Component.html) |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `c` | `unknown` |
| `constructorFunc` | [`Function`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function) |

#### Returns

`c is T`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`isInstanceOf`](./component.ViewComponent.html#isinstanceof)

***

### i18n()

**i18n**(`text`, ...`params`): `string`

Defined in: [src/core/component/view-component.ts:35](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L35)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `text` | `string` |
| ...`params` | (`string` \| `number`)[] |

#### Returns

`string`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`i18n`](./component.ViewComponent.html#i18n)

***

### setParentView()

**setParentView**(`jodit`): `this`

Defined in: [src/core/component/view-component.ts:42](https://github.com/xdan/jodit/blob/main/src/core/component/view-component.ts#L42)

Attach component to View

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `jodit` | [`IJodit`](../interfaces/types.IJodit.html) |

#### Returns

`this`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`setParentView`](./component.ViewComponent.html#setparentview)

***

### getElm()

**getElm**\<`T`\>(`this`, `elementName`): [`Nullable`](../modules/types.html#nullable)\<[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)\>

Defined in: [src/core/traits/elms.ts:18](https://github.com/xdan/jodit/blob/main/src/core/traits/elms.ts#L18)

Return element with BEM class name

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`IComponent`](../interfaces/types.IComponent.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> & [`IContainer`](../interfaces/types.IContainer.html) & [`IElms`](../interfaces/types.IElms.html) |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `this` | `T` |
| `elementName` | `string` |

#### Returns

[`Nullable`](../modules/types.html#nullable)\<[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)\>

#### Inherited from

[`Elms`](./traits.Elms.html).[`getElm`](./traits.Elms.html#getelm)

***

### getElms()

**getElms**\<`T`\>(`this`, `elementName`): [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)[]

Defined in: [src/core/traits/elms.ts:34](https://github.com/xdan/jodit/blob/main/src/core/traits/elms.ts#L34)

Return elements with BEM class name

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`IComponent`](../interfaces/types.IComponent.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> & [`IContainer`](../interfaces/types.IContainer.html) & [`IElms`](../interfaces/types.IElms.html) |

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `this` | `T` |
| `elementName` | `string` |

#### Returns

[`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement)[]

#### Inherited from

[`Elms`](./traits.Elms.html).[`getElms`](./traits.Elms.html#getelms)

***

### afterSetMod()

**afterSetMod**(`name`, `value`): `void`

Defined in: [src/core/traits/mods.ts:23](https://github.com/xdan/jodit/blob/main/src/core/traits/mods.ts#L23)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `name` | `string` |
| `value` | [`ModType`](../modules/types.html#modtype) |

#### Returns

`void`

#### Inherited from

[`Mods`](./traits.Mods.html).[`afterSetMod`](./traits.Mods.html#aftersetmod)

***

### setMod()

**setMod**\<`T`\>(`this`, `name`, `value`, `container?`): `T`

Defined in: [src/core/traits/mods.ts:30](https://github.com/xdan/jodit/blob/main/src/core/traits/mods.ts#L30)

Set/remove BEM class modification

#### Type Parameters

| Type Parameter |
| ------ |
| `T` *extends* [`IComponent`](../interfaces/types.IComponent.html)\<[`IViewBased`](../interfaces/types.IViewBased.html)\<[`IViewOptions`](../interfaces/types.IViewOptions.html)\>\> & [`IContainer`](../interfaces/types.IContainer.html) & [`IMods`](../interfaces/types.IMods.html) |

#### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `this` | `T` | - |
| `name` | `string` | - |
| `value` | [`ModType`](../modules/types.html#modtype) | if null, mod will be removed |
| `container?` | [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) | - |

#### Returns

`T`

#### Inherited from

[`Mods`](./traits.Mods.html).[`setMod`](./traits.Mods.html#setmod)

***

### getMod()

**getMod**(`this`, `name`): [`ModType`](../modules/types.html#modtype)

Defined in: [src/core/traits/mods.ts:64](https://github.com/xdan/jodit/blob/main/src/core/traits/mods.ts#L64)

Get BEM class modification value

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `this` | [`IMods`](../interfaces/types.IMods.html) |
| `name` | `string` |

#### Returns

[`ModType`](../modules/types.html#modtype)

#### Inherited from

[`Mods`](./traits.Mods.html).[`getMod`](./traits.Mods.html#getmod)

***

### className()

**className**(): `string`

Defined in: [src/modules/status-bar/status-bar.ts:33](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L33)

#### Returns

`string`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`className`](./component.ViewComponent.html#classname)

***

### hide()

**hide**(): `void`

Defined in: [src/modules/status-bar/status-bar.ts:42](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L42)

Hide statusbar

#### Returns

`void`

***

### show()

**show**(): `void`

Defined in: [src/modules/status-bar/status-bar.ts:49](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L49)

Show statusbar

#### Returns

`void`

***

### getHeight()

**getHeight**(): `number`

Defined in: [src/modules/status-bar/status-bar.ts:65](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L65)

Height of statusbar

#### Returns

`number`

***

### append()

**append**(`child`, `inTheRight?`): `void`

Defined in: [src/modules/status-bar/status-bar.ts:84](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L84)

Add element in statusbar

#### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `child` | [`HTMLElement`](https://developer.mozilla.org/docs/Web/API/HTMLElement) | `undefined` |
| `inTheRight` | `boolean` | `false` |

#### Returns

`void`

***

### destruct()

**destruct**(): `void`

Defined in: [src/modules/status-bar/status-bar.ts:116](https://github.com/xdan/jodit/blob/main/src/modules/status-bar/status-bar.ts#L116)

#### Returns

`void`

#### Inherited from

[`ViewComponent`](./component.ViewComponent.html).[`destruct`](./component.ViewComponent.html#destruct)
