# layoutModeChanged

There are two layout modes provided inside the room - `Tiled Mode (`**`tiled`**`)` and `Automatic Mode (`**`auto`**`)`.

In `Automatic Mode` the current active speaker is being displayed in a larger tile and also fine-grain controls like pinning and fullscreen are hidden from the layout.

When the user changes the layout mode by clicking on the mode switcher, the **layoutModeChanged** event will be emitted.

{% hint style="info" %}
You can also change the layout mode programmatically through the SDK. Use the [changeLayoutMode](/reference/sdk/methods/changelayoutmode.md) method to achieve that.
{% endhint %}

#### Sample payload

```json
{
  "type": "layoutModeChanged",
  "data": {
    "mode": "tiled"
  }
}
```

#### Sample subscription code

```javascript
sambaFrame.on('layoutModeChanged', (event) => {
  const data = event.data;
  //Possible values for "mode" field are "tiled" and "auto"
  console.log('Layout mode has been changed to', data.mode);
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalsamba.com/reference/sdk/events/layoutmodechanged.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
