# Consumables

interface

Object describing all features of a view element that could be consumed and converted individually. This is a non-normalized form of [`ViewNormalizedConsumables`](module_engine_view_element-ViewNormalizedConsumables.md) generated from the view Element.

Example element:

```html
<a class="foo bar" style="color: red; margin: 5px" href="https://ckeditor.com" rel="nofollow noreferrer" target="_blank">
```

The `Consumables` would include:

```json
{
	name: true,
	classes: [ "foo", "bar" ],
	styles: [ "color", "margin" ]
}
```

You could convert a `Consumable` into a [`ViewNormalizedConsumables`](module_engine_view_element-ViewNormalizedConsumables.md) using the [`normalizeConsumables`](module_engine_conversion_viewconsumable.md#function-normalizeConsumables) helper.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/conversion/viewconsumable.ts#L306)

<a id="properties">

## Properties

<a id="member-attributes">

### `attributes?: string | Array<string>`

Attribute name or array of attribute names.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/conversion/viewconsumable.ts#L317)

<a id="member-classes">

### `classes?: string | Array<string>`

Class name or array of class names.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/conversion/viewconsumable.ts#L322)

<a id="member-name">

### `name?: boolean`

If set to `true` element's name will be included in a consumable. Depending on the usage context it would be added as consumable, tested for being available for consume or consumed.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/conversion/viewconsumable.ts#L312)

<a id="member-styles">

### `styles?: string | Array<string>`

Style name or array of style names.

[See source](https://github.com/ckeditor/ckeditor5/blob/master/packages/ckeditor5-engine/src/conversion/viewconsumable.ts#L327)

---

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