diff --git a/frontend/src/lib/components/apps/components/layout/AppTabs.svelte b/frontend/src/lib/components/apps/components/layout/AppTabs.svelte
index 4d702c5eef..4811dc8e5b 100644
--- a/frontend/src/lib/components/apps/components/layout/AppTabs.svelte
+++ b/frontend/src/lib/components/apps/components/layout/AppTabs.svelte
@@ -48,6 +48,8 @@
selectedTabIndex: 0
})
+ const titleBarHeight = 40; // Example height of a single accordion title bar in pixels
+
function handleTabSelection() {
selectedIndex = tabs?.indexOf(selected)
outputs?.selectedTabIndex.set(selectedIndex)
@@ -170,28 +172,74 @@
{/each}
+ {:else if resolvedConfig.tabsKind == 'accordion'}
+
+ {#each tabs ?? [] as res, index}
+
+
+ {#if selected == res}
+
+ {
+ if (!$connectingInput.opened) {
+ $selectedComponent = [id]
+ handleTabSelection()
+ }
+ }}
+ />
+
+ {/if}
+
+ {/each}
+
{/if}
-
- {#if $app.subgrids}
- {#each tabs ?? [] as _res, i}
- {
- if (!$connectingInput.opened) {
- $selectedComponent = [id]
- handleTabSelection()
- }
- }}
- />
- {/each}
- {/if}
-
+ {#if resolvedConfig.tabsKind !== 'accordion'}
+
+ {#if $app.subgrids}
+ {#each tabs ?? [] as _res, i}
+ {
+ if (!$connectingInput.opened) {
+ $selectedComponent = [id]
+ handleTabSelection()
+ }
+ }}
+ />
+ {/each}
+ {/if}
+
+ {/if}
diff --git a/frontend/src/lib/components/apps/editor/component/components.ts b/frontend/src/lib/components/apps/editor/component/components.ts
index df833f1528..69d77160e3 100644
--- a/frontend/src/lib/components/apps/editor/component/components.ts
+++ b/frontend/src/lib/components/apps/editor/component/components.ts
@@ -446,7 +446,7 @@ const buttonColorOptions = [...BUTTON_COLORS]
export const selectOptions = {
buttonColorOptions,
- tabsKindOptions: ['tabs', 'sidebar', 'invisibleOnView'],
+ tabsKindOptions: ['tabs', 'sidebar', 'accordion', 'invisibleOnView'],
buttonSizeOptions: ['xs', 'sm', 'md', 'lg', 'xl'],
tableSearchOptions: ['By Component', 'By Runnable', 'Disabled'],
chartThemeOptions: ['theme1', 'theme2', 'theme3'],