> For the complete documentation index, see [llms.txt](https://docs.digitalsamba.com/reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalsamba.com/reference/sdk/events/layoutmodechanged.md).

# 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);
});
```
