-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(Tabs): add overflow handling #6488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mikenewbon
wants to merge
13
commits into
nuxt:v4
Choose a base branch
from
mikenewbon:feat/tabs-trigger-orientation-overflow
base: v4
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
56d6c08
feat(Tabs): add `triggerOrientation` and `overflow` props
mikenewbon 9cebd68
feat(Tabs): enhance tab component with multiple items and overflow haβ¦
mikenewbon 2b9541e
feat(Tabs): improve custom indicator handling and overflow management
mikenewbon 33046bd
feat(Tabs): refine class handling for triggers and collapse behavior
mikenewbon d33155e
feat(Tabs): add examples for overflow handling and trigger orientation
mikenewbon 5c20da7
fix(Tabs): move More trigger outside tablist and expand test coverage
mikenewbon e2fa46e
fix(Tabs): update class bindings and improve tablist styling
mikenewbon eea4b48
fix(Tabs): address CodeRabbit review feedback
mikenewbon bb3c515
refactor(Tabs): remove outdated class and ui prop documentation
mikenewbon a33e96d
fix(Tabs): keep indicator inside list slot for scroll overflow
mikenewbon eb5dd26
refactor(Tabs): remove triggerOrientation prop in favor of ui prop stβ¦
claude 09d8b38
Merge remote-tracking branch 'upstream/v4' into feat/tabs-trigger-oriβ¦
claude 8cc657a
fix(Tabs): keep SSR active-trigger fallback for wrap/collapse overflow
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
docs/app/components/content/examples/tabs/TabsOverflowCollapseExample.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <script setup lang="ts"> | ||
| import type { TabsItem } from '@nuxt/ui' | ||
|
|
||
| const items: TabsItem[] = [ | ||
| { label: 'Overview', icon: 'i-lucide-layout-dashboard', content: 'Overview content' }, | ||
| { label: 'Activity', icon: 'i-lucide-activity', content: 'Activity content' }, | ||
| { label: 'Settings', icon: 'i-lucide-settings', content: 'Settings content' }, | ||
| { label: 'Members', icon: 'i-lucide-users', content: 'Members content' }, | ||
| { label: 'Billing', icon: 'i-lucide-credit-card', content: 'Billing content' }, | ||
| { label: 'Integrations', icon: 'i-lucide-plug', content: 'Integrations content' }, | ||
| { label: 'Notifications', icon: 'i-lucide-bell', content: 'Notifications content' }, | ||
| { label: 'Security', icon: 'i-lucide-shield', content: 'Security content' } | ||
| ] | ||
| </script> | ||
|
|
||
| <template> | ||
| <UTabs | ||
| overflow="collapse" | ||
| :items="items" | ||
| class="w-96" | ||
| /> | ||
| </template> |
23 changes: 23 additions & 0 deletions
23
docs/app/components/content/examples/tabs/TabsOverflowScrollExample.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <script setup lang="ts"> | ||
| import type { TabsItem } from '@nuxt/ui' | ||
|
|
||
| const items: TabsItem[] = [ | ||
| { label: 'Overview', icon: 'i-lucide-layout-dashboard', content: 'Overview content' }, | ||
| { label: 'Activity', icon: 'i-lucide-activity', content: 'Activity content' }, | ||
| { label: 'Settings', icon: 'i-lucide-settings', content: 'Settings content' }, | ||
| { label: 'Members', icon: 'i-lucide-users', content: 'Members content' }, | ||
| { label: 'Billing', icon: 'i-lucide-credit-card', content: 'Billing content' }, | ||
| { label: 'Integrations', icon: 'i-lucide-plug', content: 'Integrations content' }, | ||
| { label: 'Notifications', icon: 'i-lucide-bell', content: 'Notifications content' }, | ||
| { label: 'Security', icon: 'i-lucide-shield', content: 'Security content' } | ||
| ] | ||
| </script> | ||
|
|
||
| <template> | ||
| <UTabs | ||
| overflow="scroll" | ||
| :content="false" | ||
| :items="items" | ||
| class="w-96" | ||
| /> | ||
| </template> |
23 changes: 23 additions & 0 deletions
23
docs/app/components/content/examples/tabs/TabsOverflowWrapExample.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <script setup lang="ts"> | ||
| import type { TabsItem } from '@nuxt/ui' | ||
|
|
||
| const items: TabsItem[] = [ | ||
| { label: 'Overview', icon: 'i-lucide-layout-dashboard', content: 'Overview content' }, | ||
| { label: 'Activity', icon: 'i-lucide-activity', content: 'Activity content' }, | ||
| { label: 'Settings', icon: 'i-lucide-settings', content: 'Settings content' }, | ||
| { label: 'Members', icon: 'i-lucide-users', content: 'Members content' }, | ||
| { label: 'Billing', icon: 'i-lucide-credit-card', content: 'Billing content' }, | ||
| { label: 'Integrations', icon: 'i-lucide-plug', content: 'Integrations content' }, | ||
| { label: 'Notifications', icon: 'i-lucide-bell', content: 'Notifications content' }, | ||
| { label: 'Security', icon: 'i-lucide-shield', content: 'Security content' } | ||
| ] | ||
| </script> | ||
|
|
||
| <template> | ||
| <UTabs | ||
| overflow="wrap" | ||
| :content="false" | ||
| :items="items" | ||
| class="w-96" | ||
| /> | ||
| </template> |
41 changes: 41 additions & 0 deletions
41
docs/app/components/content/examples/tabs/TabsTriggerOrientationExample.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <script setup lang="ts"> | ||
| import type { TabsItem } from '@nuxt/ui' | ||
|
|
||
| const items: TabsItem[] = [ | ||
| { | ||
| label: 'Home', | ||
| icon: 'i-lucide-house', | ||
| content: 'Home content' | ||
| }, | ||
| { | ||
| label: 'Activity', | ||
| icon: 'i-lucide-activity', | ||
| content: 'Activity content' | ||
| }, | ||
| { | ||
| label: 'Settings', | ||
| icon: 'i-lucide-settings', | ||
| content: 'Settings content' | ||
| }, | ||
| { | ||
| label: 'Profile', | ||
| icon: 'i-lucide-user', | ||
| content: 'Profile content' | ||
| } | ||
| ] | ||
| </script> | ||
|
|
||
| <template> | ||
| <UTabs | ||
| trigger-orientation="vertical" | ||
| variant="link" | ||
| color="neutral" | ||
| :items="items" | ||
| :ui="{ | ||
| root: 'w-full border-t border-default py-2', | ||
| list: 'justify-around w-full', | ||
| trigger: 'grow-0' | ||
| }" | ||
| class="w-full" | ||
| /> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.