huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://shadcn-svelte.com
MIT License
4.41k stars 278 forks source link

Vertical orientation for tabs #960

Open martinjo opened 3 months ago

martinjo commented 3 months ago

Describe the feature

Tabs have a ”orientation” property that I was expecting to affect how the tabs orient themselves visually. It seems to have no or another effect. But having an orientation property that affects layout (horizontal/vertical) would be so nice.

Are there any plans for this or examples of how it could be achieved?

huntabyte commented 3 months ago

The orientation is for accessibility purposes. We could possibly add an example for vertical tabs.

martinjo commented 3 months ago

I figured it had some function :). An example with vertical tabs would be great! 🙏

BeGeos commented 2 months ago

What would the example need to be? Like just a piece of code or a with a selectable preview also?

oluijks commented 1 week ago

@huntabyte The name of the property `orientation' (The orientation of the tabs) is a bit misleading, it suggests that the tabs could be visually rendered horizontally or vertically. The documentation in the code of bits-ui is clear about this but I can imagine that people would be a little disappointed when finding out that it only applies to keyboard navigation...

What to do? Update bits-ui property name and docs or update the shadcn-svelte docs with a remark about the tabs properties? Or a third option: implement visually vertically rendered tabs?