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

[Base][Tab] Add vertical tabs demo #37292

Merged
merged 11 commits into from
May 22, 2023
Merged

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented May 16, 2023

@sai6855 sai6855 marked this pull request as draft May 16, 2023 16:51
@sai6855 sai6855 added docs Improvements or additions to the documentation component: tabs This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels May 16, 2023
@mui-bot
Copy link

mui-bot commented May 16, 2023

Netlify deploy preview

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against c6db9d9

@sai6855 sai6855 marked this pull request as ready for review May 16, 2023 17:24
@sai6855 sai6855 requested a review from michaldudak May 16, 2023 17:27
@danilo-leal danilo-leal requested a review from zanivan May 17, 2023 20:38
Copy link
Contributor

@zanivan zanivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, mate! Just made a few tweaks to the design.

@@ -67,6 +67,12 @@ The next demo shows how to apply custom styles to a set of tabs:

{{"demo": "UnstyledTabsCustomized.js"}}

### Vertical
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this section down to underneath the ## Customization header? It can be the first item, above the section about TypeScript.

@@ -67,6 +67,12 @@ The next demo shows how to apply custom styles to a set of tabs:

{{"demo": "UnstyledTabsCustomized.js"}}

### Vertical

To adapt keyboard navigation (e.g. arrow keys) to use a vertical orientation, set `orientation="vertical"` on the `Tabs` component.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this more informative, and also clarify that it's a "must" for a11y purposes.

Suggested change
To adapt keyboard navigation (e.g. arrow keys) to use a vertical orientation, set `orientation="vertical"` on the `Tabs` component.
Tab components can be arranged vertically as well as horizontally.
When vertical, you must set `orientation="vertical"` on the `<Tabs />` component so the user can navigate with the up and down arrow keys (rather than the default left-to-right behavior for horizontal tabs).

@michaldudak michaldudak merged commit 9a8c2ef into mui:master May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tabs This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[base][Tabs] orientation and direction props don't cause any changes
5 participants