# Tab

## <mark style="color:green;">class</mark> **Tab**

#### Constructor

```python
# Only required parameters
tab = Tab(name="Custom Tab")

# All parameters
tab = Tab(
    name="Custom Tab",
    icon="users",
    gap: 8,
    title="My Custom Tab"
)
```

<table><thead><tr><th width="381">Parameter</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td><p>Allowed: <code>string</code><br></p><p>Must be <strong>unique</strong> across the whole UI, cannot be longer than 36 characters</p></td></tr><tr><td>icon </td><td><p>Allowed: <code>string</code><br><br>Icon tab </p><p>Available icons: <a data-mention href="#icons">#icons</a></p></td></tr><tr><td>gap </td><td>See <a href="..#gap">Gap</a><br>Default: <code>6</code><br><br>Spacing between <a href="cardcontainer">CardContainer</a> elements. In most cases you can omit this.</td></tr><tr><td>title </td><td><p>Allowed: <code>string | None</code><br>Default: <code>None</code></p><p></p><p>Displayed at the top of your custom tab, above the cards.</p></td></tr></tbody></table>

#### Methods

<table><thead><tr><th width="257">Method</th><th>Description</th></tr></thead><tbody><tr><td>create_container(type, **kwargs)</td><td>Adds a <a href="cardcontainer">CardContainer </a>to the Tab.</td></tr><tr><td>render()</td><td>Initializes the Tab. Should be called last, after all UI elements, cards, and containers are defined.</td></tr><tr><td>toast(title, description, type)</td><td><p>Displays a toast notification inside the app.<br><br><strong>Parameters</strong>:</p><ul><li><strong>Title</strong>: <code>string</code> | <em>required</em></li><li><strong>Description</strong>: <code>string</code> | <em>required</em></li><li><strong>Type</strong>: <code>"INFO"</code>, <code>"ERROR"</code>, <code>"SUCCESS"</code> |  <em>required</em></li></ul><p>Example:</p><pre class="language-python"><code class="lang-python">tab.toast(type="INFO", title="Hello, World!", description="Welcome from py!")
</code></pre><p></p><p><strong>Note</strong>: The toast will only display if the custom tab is open.</p></td></tr></tbody></table>

#### Icons

<table><thead><tr><th width="133">Image</th><th>String</th></tr></thead><tbody><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FkZ2M7R7MSPhT8o2hruT1%2FLayer%20139.png?alt=media&#x26;token=d57429a9-a955-48dc-9920-45191b608190" alt="" data-size="original"></td><td>report</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FaasArhIUtR5gWerCsTLX%2FScreenshot%20(186)1.png?alt=media&#x26;token=3382ecee-680f-4290-8f16-4337da1fc743" alt="" data-size="original"></td><td>chart</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FUig4r7BIO3WpDeOz8OIW%2FScreenshot%20(187)2.png?alt=media&#x26;token=b66f91bf-2eae-4ba8-b75b-8f56e5c7d45e" alt="" data-size="original"></td><td>two_way</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FvY8f5bNYrHdUBBzWEqcD%2FScreenshot%20(188)3.png?alt=media&#x26;token=2e7d10a0-c896-4cf3-910b-7dbd25d1c610" alt="" data-size="original"></td><td>inbox</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2Ffs7QqJdhPj2EHgGDPIwg%2FScreenshot%20(189)4.png?alt=media&#x26;token=5ded02a2-bb87-4173-a772-bfdc5cb8eae2" alt="" data-size="original"></td><td>star</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FvIt5fqBT8PT3CwE67Pji%2FScreenshot%20(190)5.png?alt=media&#x26;token=e95848b3-f8c2-4cdb-af54-410a9a1a64f4" alt="" data-size="original"></td><td>search</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FTWIw5M90bsg9irHlnG0e%2FScreenshot%20(185).png?alt=media&#x26;token=d974081e-b2b2-4ce8-9309-4a68ce75a913" alt="" data-size="original"></td><td>variants</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2Ftnt6XIXGJa66HoLV2evh%2FScreenshot%20(191)6.png?alt=media&#x26;token=a0e5c408-b8fa-40bd-b5cc-897bee91c997" alt="" data-size="original"></td><td>message</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FOXQyhQx5Zhg7PhX59Z8c%2FScreenshot%20(192)7.png?alt=media&#x26;token=729805f2-dac8-40be-ab28-8a225f52b4af" alt="" data-size="original"></td><td>users</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FtCzsJHsw0cN3weNRPscQ%2FScreenshot%20(193)8.png?alt=media&#x26;token=ba13fd64-b80c-4fb9-b3e4-3a44c6307220" alt="" data-size="original"></td><td>history</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FzDsFvwIIzgxteskO2iKi%2FScreenshot%20(194)9.png?alt=media&#x26;token=74444008-f948-4241-8240-f787804d54b1" alt="" data-size="original"></td><td>clean</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FrJL88pWd80KVYvBYAlc4%2FScreenshot%20(195)10.png?alt=media&#x26;token=bdb3b0a0-7a27-4dda-bb9c-f4b5e53d21a6" alt="" data-size="original"></td><td>magic</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FNSP8m7JXTmhklFQGIPL4%2FScreenshot%20(196)11.png?alt=media&#x26;token=82adfea7-c6f0-4cdd-815c-6df3c374d9ca" alt="" data-size="original"></td><td>eraser</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FmJp14rUgkedN9yzF48o5%2FScreenshot%20(197)12.png?alt=media&#x26;token=42774178-e15a-4310-93ef-6058b22c52a6" alt="" data-size="original"></td><td>convert</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FBwMIVYoVzJzL55jS2m63%2FScreenshot%20(198)13.png?alt=media&#x26;token=397fa8d1-4a04-42ca-ba5e-85555971dc91" alt="" data-size="original"></td><td>cloud</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FI1arTNVMTs6y5xHCZiV4%2FScreenshot%20(199)14.png?alt=media&#x26;token=d0fb0554-e88b-464d-897a-f182ba064f2a" alt="" data-size="original"></td><td>calc</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FFuDV2eeTnUSEFpN0e0KE%2FScreenshot%20(200)15.png?alt=media&#x26;token=e7e12cc2-f7a9-4708-9943-3bf93ab4be58" alt="" data-size="original"></td><td>calendar</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FxEym7RTeK0jvlGJUL7Dj%2FScreenshot%20(201)16.png?alt=media&#x26;token=e8acaf0c-d9f3-490f-8b78-5d2daf9c57e5" alt="" data-size="original"></td><td>key</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FnJXX8e1uJ6M4Ybq5Tcic%2FScreenshot%20(202)17.png?alt=media&#x26;token=67da827f-9cec-488c-917a-c5a146f4bd83" alt="" data-size="original"></td><td>gift</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FfVGhXuGbfGlo3xeI2czz%2FScreenshot%20(203)18.png?alt=media&#x26;token=7ca216cd-7f70-4424-bf3b-cf887c61956e" alt="" data-size="original"></td><td>trophy</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2Fkwk0r8nMnkyTzZ5vaqp4%2FScreenshot%20(204)19.png?alt=media&#x26;token=6e4d30b7-6cf4-466e-a052-986ba4ef11fd" alt="" data-size="original"></td><td>book</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FNjHiyEuxqlmtCfTPkdGc%2FScreenshot%20(205)20.png?alt=media&#x26;token=13b08582-c2c4-4d38-9b27-a8fdc6f4aa3d" alt="" data-size="original"></td><td>sun</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FOmVw371Tk4Gs3RGb9SqA%2FScreenshot%20(206)21.png?alt=media&#x26;token=3fe32c95-c536-460b-9863-d3d9c5f02259" alt="" data-size="original"></td><td>cart</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FA1wC5ISUR3plYg4QEuOa%2FScreenshot%20(207)22.png?alt=media&#x26;token=e0e60cb3-916f-48c3-a945-0f37467afdc7" alt="" data-size="original"></td><td>pill</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FwkDQNGUYD9vQhjY5xQEt%2FScreenshot%20(208)23.png?alt=media&#x26;token=eaa6b05b-33fe-4741-a220-b5ef3178ccce" alt="" data-size="original"></td><td>bookmark</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2Ff7hi5bI4gko60BrjDnjD%2FScreenshot%20(209)24.png?alt=media&#x26;token=8b81163a-3e3d-460c-8d5e-61bf5d82d2a0" alt="" data-size="original"></td><td>mail</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2Fqc1XajJuOZdweq3mpN2H%2FScreenshot%20(210)25.png?alt=media&#x26;token=565cf2d9-61d8-4ea9-8e29-f670ffae15e8" alt="" data-size="original"></td><td>bear</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FOLwVm8vnmrUR7TvyfOjP%2FScreenshot%20(211)26.png?alt=media&#x26;token=71c75c83-85f5-4449-8864-c8dc8f987824" alt="" data-size="original"></td><td>heart</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FvnUqaNuaFg8EQMyA7wIP%2FScreenshot%20(212)27.png?alt=media&#x26;token=ae3e496e-a94f-4fbf-a77e-8acd2ffe96d0" alt="" data-size="original"></td><td>music</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FElbCt1VIYoEclObmJzHD%2FScreenshot%20(213)28.png?alt=media&#x26;token=b2418314-b5d6-4940-9ea3-572457d18611" alt="" data-size="original"></td><td>umbrella</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FH2FoCMbycLxpdM9LgcYp%2FScreenshot%20(214)29.png?alt=media&#x26;token=4135b36b-6b0a-4db7-a708-78a63a1eae45" alt="" data-size="original"></td><td>tube</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FOwPl9nt0H11tJ1l1cr62%2FScreenshot%20(215)30.png?alt=media&#x26;token=f850015d-f050-4da9-affd-d2327c66d834" alt="" data-size="original"></td><td>palette</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2F9x1RpCm2YRBNR2yYlkxk%2FScreenshot%20(216)31.png?alt=media&#x26;token=8fa63476-ac14-4cee-a248-9761e81d7119" alt="" data-size="original"></td><td>lock</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FnE14eghDNFaM7x4Lsazj%2FScreenshot%20(217)32.png?alt=media&#x26;token=43215e31-ac45-4628-a57f-53f6e6d8e860" alt="" data-size="original"></td><td>fire</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2F6dNAkNDXB4CRcff38JkV%2FScreenshot%20(218)33.png?alt=media&#x26;token=9a18a1cd-a491-46a4-abb4-b0e65e73419f" alt="" data-size="original"></td><td>preferences</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FzIQEpD3titS6kiyKj6P5%2FScreenshot%20(219)34.png?alt=media&#x26;token=57aba2bc-b977-4836-8126-cae21868bf53" alt="" data-size="original"></td><td>power</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FWljDmQrj9uMM1YUoMDv0%2FScreenshot%20(221)36.png?alt=media&#x26;token=b82e437b-026b-4754-86df-3723886af82b" alt="" data-size="original"></td><td>share</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FqIShaG4Pm1PahCOT1h0L%2FScreenshot%20(222)37.png?alt=media&#x26;token=04f04a5e-5dca-4984-a5ea-c35d3d5a4eac" alt="" data-size="original"></td><td>bell</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FghQUAkVlBk570ttNTwJl%2FScreenshot%20(223)38.png?alt=media&#x26;token=0c3f8873-492a-4244-a69c-43b23de1bd2b" alt="" data-size="original"></td><td>trash</td></tr><tr><td><img src="https://3836407116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaFce5BqRsGvQObqcfG7q%2Fuploads%2FXzt0EJ7c2j6BKTtOYbEp%2FScreenshot%20(224)0.png?alt=media&#x26;token=d070c33e-f41b-4d71-b680-fecd1e143488" alt="" data-size="original"></td><td>nitro</td></tr></tbody></table>
