radix-vue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
3.71k stars 209 forks source link

[Bug]: Tabs set orientation="vertical" not working #492

Open qianmoQ opened 3 months ago

qianmoQ commented 3 months ago

Reproduction

None

Describe the bug

image

Code

<script setup lang="ts">
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
</script>

<template>
  <Tabs default-value="account" orientation="vertical">
    <TabsList >
      <TabsTrigger value="account"> Account </TabsTrigger>
      <TabsTrigger value="password"> Password </TabsTrigger>
    </TabsList>
  </Tabs>
</template>

System Info

Microsoft Edge

Contributes

chachew commented 2 months ago

So this doesn't even seem to work with Radix-vue, which is what shadcn-vue is using under the hood.

selemondev commented 2 months ago

So this doesn't even seem to work with Radix-vue, which is what shadcn-vue is using under the hood.

I have gone 2 steps behind and tested Radix UI and Shadcn UI as well. In both libraries, the orientation='vertical' prop doesn't work. You can check out the comment here .

sadeghbarati commented 2 months ago

@zernonia Hey please transfer this issue to radix-vue then

zernonia commented 2 months ago

@sadeghbarati @qianmoQ as per the comment here https://github.com/radix-ui/primitives/issues/2837#issuecomment-2054088663, you need to style your own base on the data-attributes. This props only handles the keyboard behavior. So it's not relevant to radix-vue. You may check the prop description for orientation here

We can extend the styling and cater for the orientation in shadcn-vue 😁

qianmoQ commented 2 months ago

@sadeghbarati @qianmoQ as per the comment here radix-ui/primitives#2837 (comment), you need to style your own base on the data-attributes. This props only handles the keyboard behavior. So it's not relevant to radix-vue. You may check the prop description for orientation here

We can extend the styling and cater for the orientation in shadcn-vue 😁

image https://www.radix-vue.com/components/tabs#root There is a problem with the documentation. The documentation describes the layout of tabs.