# 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 %}


---

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