question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Tabs] Improve `orientation` prop support

See original GitHub issue

The Tabs component technically supports the orientation prop (values of vertical or horizontal), but the effect it has is to switch between keyDown handlers for ArrowUp+ArrowDown or ArrowLeft+ArrowRight and to alter the aria-orientation prop. The default theme provides no visual support for the vertical orientation, and the orientation prop is entirely undocumented.

  • Add theme support for vertical tabs
  • Document the orientation prop

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
rockchalkwushockcommented, Jul 17, 2020

@dodas @with-heart

Spoke with @segunadebayo this morning and am starting work on this tonight

4reactions
dodascommented, Jul 14, 2020

Example of possible implementation:

// ⁨chakra-ui⁩/⁨packages⁩/⁨theme⁩/src⁩/components⁩/tabs.ts

// Before:
tablist: {
  borderBottom: "2px solid",
  borderColor: "inherit",
},

// After:
tablist: {
  [props.orientation === "vertical" ? "borderRight" : "borderBottom"]: "2px solid",
  borderColor: "inherit",
},

This, and similar orientation-aware definitions would repeat few times across the file, so my question is whether it is readable enough or you guys want to do some type of abstraction/refactoring here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Orientation of tabs component does not work in RadixUI
According to Radix UI, they are a style-free library, which means that the orientation prop does not change the UI.
Read more >
Defining the Orientation and Appearance of MDI Tabs
Tab orientation can be changed using the TabOrientation property of the TabGroupSettings object. Orientation of the text on the tabs may be changed...
Read more >
Tabs | APG | WAI
Tabs are a set of layered sections of content, known as tab panels, that display one panel of ... it has the property...
Read more >
Tabs
You can change the alignment of the TabList by passing align prop. We support 3 sizes start , center , end . One...
Read more >
Telerik Web UI TabStrip Orientation and Alignment Demo
RadTabStrip supports two layouts - Horizontal (default) and Vertical. In Horizontal layout, the Align property allows you to specify the way tabs position ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found