Skip to content

Commit

Permalink
[material-ui][docs] Improve TabContext, TabList, and TabPanel documen…
Browse files Browse the repository at this point in the history
…tation (#40587)
  • Loading branch information
anle9650 authored Jan 17, 2024
1 parent ac5a1e0 commit 23a9e24
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions docs/data/material/components/tabs/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,30 @@ 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.

{{"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
following [WAI-ARIA authoring practices](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).
following [WAI-ARIA authoring practices](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/):

- `<TabList />` - the container that houses the tabs. Responsible for handling focus and keyboard navigation between 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.

{{"demo": "LabTabs.js"}}

Expand Down

0 comments on commit 23a9e24

Please sign in to comment.