---
title: "Mods"
---
# Mods

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

## Extended by

- [`UIElement`](./ui.UIElement.html)
- [`View`](./view.View.html)
- [`StatusBar`](./status_bar.StatusBar.html)

## Implements

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

### Constructor

**new Mods**(): `Mods`

#### Returns

`Mods`

### mods

`abstract` **mods**: [`IDictionary`](../modules/types.html#idictionary)

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

#### Implementation of

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

### 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`

#### Implementation of

[`IMods`](../interfaces/types.IMods.html).[`afterSetMod`](../interfaces/types.IMods.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`

#### Implementation of

[`IMods`](../interfaces/types.IMods.html).[`setMod`](../interfaces/types.IMods.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)

#### Implementation of

[`IMods`](../interfaces/types.IMods.html).[`getMod`](../interfaces/types.IMods.html#getmod)
