diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md
index ad431615..3509b894 100644
--- a/COMPONENT_INDEX.md
+++ b/COMPONENT_INDEX.md
@@ -3984,12 +3984,13 @@ None.
### Props
-| Prop name | Kind | Reactive | Type | Default value | Description |
-| :-------------- | :--------------- | :------- | :---------------------------------------- | -------------------------------- | ------------------------------------------- |
-| selected | let
| Yes | number
| 0
| Specify the selected tab index |
-| type | let
| No | "default" | "container"
| "default"
| Specify the type of tabs |
-| iconDescription | let
| No | string
| "Show menu options"
| Specify the ARIA label for the chevron icon |
-| triggerHref | let
| No | string
| "#"
| Specify the tab trigger href attribute |
+| Prop name | Kind | Reactive | Type | Default value | Description |
+| :-------------- | :--------------- | :------- | :---------------------------------------- | -------------------------------- | -------------------------------------------- |
+| selected | let
| Yes | number
| 0
| Specify the selected tab index |
+| type | let
| No | "default" | "container"
| "default"
| Specify the type of tabs |
+| autoWidth | let
| No | boolean
| false
| Set to `true` for tabs to have an auto-width |
+| iconDescription | let
| No | string
| "Show menu options"
| Specify the ARIA label for the chevron icon |
+| triggerHref | let
| No | string
| "#"
| Specify the tab trigger href attribute |
### Slots
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index 9176f272..e0ba6965 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -10985,6 +10985,17 @@
"constant": false,
"reactive": false
},
+ {
+ "name": "autoWidth",
+ "kind": "let",
+ "description": "Set to `true` for tabs to have an auto-width",
+ "type": "boolean",
+ "value": "false",
+ "isFunction": false,
+ "isFunctionDeclaration": false,
+ "constant": false,
+ "reactive": false
+ },
{
"name": "iconDescription",
"kind": "let",
diff --git a/src/Tabs/Tab.svelte b/src/Tabs/Tab.svelte
index 09d84ca0..c276e17e 100644
--- a/src/Tabs/Tab.svelte
+++ b/src/Tabs/Tab.svelte
@@ -22,7 +22,7 @@
import { onMount, afterUpdate, getContext, tick } from "svelte";
- const { selectedTab, add, update, change } = getContext("Tabs");
+ const { selectedTab, useAutoWidth, add, update, change } = getContext("Tabs");
add({ id, label, disabled });
@@ -81,6 +81,7 @@
id="{id}"
href="{href}"
class:bx--tabs__nav-link="{true}"
+ style="{$useAutoWidth ? 'width: auto' : undefined}"
>