# AnnotationsSidebarConfig

interface

The configuration of the sidebar feature.

```typescript
ClassicEditor
	.create( {
		sidebar: {
			// Sidebar feature configuration.
		}
	} )
.then( ... )
.catch( ... );
```

See [all editor configuration options](module_core_editor_editorconfig-EditorConfig.md).

<a id="properties">

## Properties

<a id="member-container">

### `container?: HTMLElement`

DOM element into which the sidebar will be inserted.

<a id="member-overlayContainer">

### `overlayContainer?: ShadowRoot | HTMLElement`

DOM element or shadow root into which the floating annotation balloon of the narrow sidebar is mounted.

When the narrow sidebar runs inside a shadow root, provide this container as a separate shadow root attached to a host element placed at the end of `document.body`, rather than to an element nested in the sidebar's own tree. As a direct child of `document.body`, that host has no scrollable or `overflow: hidden` ancestor to clip the balloon (the [`container`](#member-container) typically clips its own overflow).

When it is not set, the shared [`ui.overlayContainer`](module_core_editor_editorconfig-UiConfig.md#member-overlayContainer) from the context configuration is used instead, if present. Otherwise the balloon is mounted into the shadow root that the [`container`](#member-container) lives in, so it inherits the same styles; the `document.body` default is meant just for a narrow sidebar in the light DOM.

<a id="member-preventScrollOutOfView">

### `preventScrollOutOfView?: boolean`

Changes how the annotations are positioned inside the sidebar.

If set to `true`, the top annotation in the sidebar will never be scrolled above the top edge of the sidebar (which would make it hidden).

On the other hand, with this setting enabled, if there is not enough space, annotations will not be positioned exactly next to their linked elements when selected.

Defaults to `false`

---

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