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

[material-ui][docs] Improve TabContext, TabList, and TabPanel documentation #40587

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs/data/material/components/tabs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,25 @@ Tabs organize and allow navigation between groups of content that are related an

{{"component": "modules/components/ComponentLinkHeader.js"}}

## Basic tabs
## Introduction

A basic example with tab panels.
Tabs are implemented using a collection of related components:

- `<Tab />` - the tab element itself. Clicking on a tab displays its corresponding panel.
- `<Tabs />` - the container that houses the tabs. Responsible for handling focus and keyboard navigation between tabs.
- `<TabList />` - an alternative to the Tabs component, which automatically injects props to implement accessible tabs.
- `<TabPanel />` - the card that hosts the content associated with a tab.
- `<TabContext />` - the top-level component that wraps the Tab List and Tab Panel components, and automatically injects props to implement accessible tabs.

{{"demo": "BasicTabs.js"}}

## Basics

```jsx
import Tabs from '@mui/material/Tabs';
import Tab from '@mui/material/Tab';
```

## Experimental API

`@mui/lab` offers utility components that inject props to implement accessible tabs
Expand Down
Loading