> 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/methods/changelayoutmode.md).

# changeLayoutMode()

Changes the layout mode according to the provided param - "**tiled**" or "**auto**" (automatic).

```javascript
//Changes the layout mode to automatic
sambaFrame.changeLayoutMode('auto');

//Changes the layout mode to tiled
sambaFrame.changeLayoutMode('tiled');
```

{% hint style="info" %}
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.
{% endhint %}

**Sample use cases**:&#x20;

* You may want to change the room layout mode on the fly during the call.
* You may have developed a mode switcher outside the Samba iframe and want to control the layout inside the room.

{% hint style="info" %}
The related event is [layoutModeChanged](/reference/sdk/events/layoutmodechanged.md), if you want to be informed when the layout mode has been changed.
{% endhint %}
