Skip to content
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

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

Open
2 tasks
qianmoQ opened this issue Apr 14, 2024 · 5 comments
Open
2 tasks

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

qianmoQ opened this issue Apr 14, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@qianmoQ
Copy link

qianmoQ commented Apr 14, 2024

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

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests
@qianmoQ qianmoQ added the bug Something isn't working label Apr 14, 2024
@chachew
Copy link
Contributor

chachew commented Apr 19, 2024

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

@selemondev
Copy link
Contributor

selemondev commented Apr 20, 2024

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
Copy link
Collaborator

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

@zernonia
Copy link
Contributor

zernonia commented Apr 20, 2024

@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 😁

@qianmoQ
Copy link
Author

qianmoQ commented Apr 21, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants