diff --git a/playground/pages/tabs.vue b/playground/pages/tabs.vue index d6de70fe..ea2ffe99 100644 --- a/playground/pages/tabs.vue +++ b/playground/pages/tabs.vue @@ -17,5 +17,8 @@ const items = [{ diff --git a/src/runtime/components/Tabs.vue b/src/runtime/components/Tabs.vue index ad1b796d..ec14ffab 100644 --- a/src/runtime/components/Tabs.vue +++ b/src/runtime/components/Tabs.vue @@ -44,14 +44,17 @@ import { defu } from 'defu' import { TabsRoot, TabsList, TabsIndicator, TabsTrigger, TabsContent, useForwardPropsEmits } from 'radix-vue' import { reactivePick } from '@vueuse/core' -const props = withDefaults(defineProps>(), { defaultValue: '0' }) +const props = withDefaults(defineProps>(), { + defaultValue: '0', + orientation: 'horizontal' +}) const emits = defineEmits() defineSlots>() const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'defaultValue', 'orientation', 'activationMode', 'modelValue'), emits) const contentProps = toRef(() => defu(props.content, { forceMount: true }) as TabsContentProps) -const ui = computed(() => tv({ extend: tabs, slots: props.ui })()) +const ui = computed(() => tv({ extend: tabs, slots: props.ui })({ orientation: props.orientation }))