|
|
@@ -1,6 +1,6 @@
|
|
|
---
|
|
|
localeCode: en-US
|
|
|
-order: 44
|
|
|
+order: 45
|
|
|
category: Navigation
|
|
|
title: Tabs
|
|
|
subTitle: Tabs
|
|
|
@@ -21,15 +21,15 @@ import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
|
Tbs supports three types of styles: `line`, `button`, and `card`. By default, the first tab is selected.
|
|
|
|
|
|
Tabs supports two declare ways, and the rendering process of the two is different:
|
|
|
-- Pass the array of objects through `tabList`, when using `tabList`, only render the currently passed node each time
|
|
|
-- Or use `<TabPane>` to explicitly pass in item by item. When using `<TabPane>`, all panels will be rendered by default. You can set `keepDOM={false}` to only render the current panel, and there will be no animation effect at this time .
|
|
|
+
|
|
|
+- Pass the array of objects through `tabList`, when using `tabList`, only render the currently passed node each time
|
|
|
+- Or use `<TabPane>` to explicitly pass in item by item. When using `<TabPane>`, all panels will be rendered by default. You can set `keepDOM={false}` to only render the current panel, and there will be no animation effect at this time .
|
|
|
|
|
|
<Notice title='Notice'>
|
|
|
1. When tabList and TabPane Children are used at the same time, the data passed in through tabList will be rendered first. It is not recommended to configure both <br/>
|
|
|
2. When using TabPane Children, TabPane must be a direct child element of Tabs, otherwise Tabs will not be able to correctly collect related attributes such as itemKey and other subcomponents
|
|
|
</Notice>
|
|
|
|
|
|
-
|
|
|
```jsx live=true
|
|
|
import React from 'react';
|
|
|
import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
|
@@ -80,9 +80,7 @@ class App extends React.Component {
|
|
|
backgroundColor: 'var(--semi-color-fill-0)',
|
|
|
}}
|
|
|
>
|
|
|
- <code>
|
|
|
- yarn add @douyinfe/semi-ui
|
|
|
- </code>
|
|
|
+ <code>yarn add @douyinfe/semi-ui</code>
|
|
|
</pre>
|
|
|
</TabPane>
|
|
|
<TabPane tab="Help" itemKey="3">
|
|
|
@@ -220,50 +218,57 @@ class App extends React.Component {
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-
|
|
|
-### More with Dropdown
|
|
|
-
|
|
|
+### More with Dropdown
|
|
|
|
|
|
Supports merging redundant tabs into a `more` drop-down menu. Just pass in a number for `more`. The number represents the number of tabs included in the drop-down menu. **(>=v2.59.0)**
|
|
|
|
|
|
-
|
|
|
```jsx live=true dir=column
|
|
|
import React from 'react';
|
|
|
import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
|
|
|
|
-function Demo(){
|
|
|
- return (
|
|
|
- <Tabs more={4} style={{ width: '60%', margin: '20px' }} type="card">
|
|
|
+function Demo() {
|
|
|
+ return (
|
|
|
+ <Tabs more={4} style={{ width: '60%', margin: '20px' }} type="card">
|
|
|
{[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => (
|
|
|
- <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
- Content of card tab {i}
|
|
|
- </TabPane>
|
|
|
+ <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
+ Content of card tab {i}
|
|
|
+ </TabPane>
|
|
|
))}
|
|
|
- </Tabs>
|
|
|
- );
|
|
|
+ </Tabs>
|
|
|
+ );
|
|
|
}
|
|
|
```
|
|
|
|
|
|
Advanced configuration is also supported, passing the object to `more`, and it can be passed in
|
|
|
|
|
|
-- `count`: Represents the number of Tabs in the income drop-down menu
|
|
|
-- `render`: Customize the rendering function of Trigger. The returned ReactNode will be rendered as the Trigger of the drop-down menu.
|
|
|
-- `dropdownProps`: Incoming DropDown Props will be transparently transmitted to the drop-down menu. If you need to customize the drop-down menu, use the render method in dropdownProps
|
|
|
+- `count`: Represents the number of Tabs in the income drop-down menu
|
|
|
+- `render`: Customize the rendering function of Trigger. The returned ReactNode will be rendered as the Trigger of the drop-down menu.
|
|
|
+- `dropdownProps`: Incoming DropDown Props will be transparently transmitted to the drop-down menu. If you need to customize the drop-down menu, use the render method in dropdownProps
|
|
|
|
|
|
```jsx live=true dir=column
|
|
|
import React from 'react';
|
|
|
-import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
|
+import { Tabs, TabPane, Button } from '@douyinfe/semi-ui';
|
|
|
|
|
|
-function Demo(){
|
|
|
- return (
|
|
|
- <Tabs more={{ count: 4, render: ()=>{return <div style={{ display: 'inline-block' }}>Click to show More</div>;}, dropdownProps: { trigger: "click" } }} style={{ width: '60%', margin: '20px' }} type="card">
|
|
|
+function Demo() {
|
|
|
+ return (
|
|
|
+ <Tabs
|
|
|
+ more={{
|
|
|
+ count: 4,
|
|
|
+ render: () => {
|
|
|
+ return <Button type='tertiary'>Click to show More</Button>;
|
|
|
+ },
|
|
|
+ dropdownProps: { trigger: 'click', position: 'bottomRight' },
|
|
|
+ }}
|
|
|
+ style={{ width: '60%', margin: '20px' }}
|
|
|
+ type="card"
|
|
|
+ >
|
|
|
{[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => (
|
|
|
- <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
- Content of card tab {i}
|
|
|
- </TabPane>
|
|
|
+ <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
+ Content of card tab {i}
|
|
|
+ </TabPane>
|
|
|
))}
|
|
|
- </Tabs>
|
|
|
- );
|
|
|
+ </Tabs>
|
|
|
+ );
|
|
|
}
|
|
|
```
|
|
|
|
|
|
@@ -296,7 +301,7 @@ class App extends React.Component {
|
|
|
<RadioGroup
|
|
|
onChange={e => this.onSelect(e)}
|
|
|
value={this.state.type}
|
|
|
- type='button'
|
|
|
+ type="button"
|
|
|
style={{
|
|
|
display: 'flex',
|
|
|
width: 200,
|
|
|
@@ -374,6 +379,112 @@ class App extends React.Component {
|
|
|
}
|
|
|
```
|
|
|
|
|
|
+**Modify the scrolling rendering Arrow**
|
|
|
+
|
|
|
+`renderArrow` modifies the Arrow, with the input parameters being the overflowed items and position
|
|
|
+
|
|
|
+```jsx live=true dir="column"
|
|
|
+import React from 'react';
|
|
|
+import { Tabs, TabPane, Dropdown } from '@douyinfe/semi-ui';
|
|
|
+
|
|
|
+() => {
|
|
|
+ const [activeKey, setActiveKey] = useState('Tab-0');
|
|
|
+ const renderArrow = (items, pos, handleArrowClick) => {
|
|
|
+ const style = {
|
|
|
+ width: 32,
|
|
|
+ height: 32,
|
|
|
+ margin: '0 12px',
|
|
|
+ display: 'flex',
|
|
|
+ justifyContent: 'center',
|
|
|
+ alignItems: 'center',
|
|
|
+ borderRadius: '100%',
|
|
|
+ background: 'rgba(var(--semi-grey-1), 1)',
|
|
|
+ color: 'var(--semi-color-text)',
|
|
|
+ cursor: 'pointer',
|
|
|
+ };
|
|
|
+ return (
|
|
|
+ <Dropdown
|
|
|
+ render={
|
|
|
+ <Dropdown.Menu>
|
|
|
+ {items.map(item => {
|
|
|
+ return (
|
|
|
+ <Dropdown.Item onClick={() => setActiveKey(item.itemKey)}>{item.itemKey}</Dropdown.Item>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </Dropdown.Menu>
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {pos === 'start' ? (
|
|
|
+ <div style={style} onClick={handleArrowClick}>
|
|
|
+ ←
|
|
|
+ </div>
|
|
|
+ ) : (
|
|
|
+ <div style={style} onClick={handleArrowClick}>
|
|
|
+ →
|
|
|
+ </div>
|
|
|
+ )}
|
|
|
+ </Dropdown>
|
|
|
+ );
|
|
|
+ };
|
|
|
+
|
|
|
+ return (
|
|
|
+ <Tabs
|
|
|
+ renderArrow={renderArrow}
|
|
|
+ style={{ width: '50%', margin: '20px' }}
|
|
|
+ activeKey={activeKey}
|
|
|
+ type="card"
|
|
|
+ collapsible
|
|
|
+ onChange={k => setActiveKey(k)}
|
|
|
+ >
|
|
|
+ {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => (
|
|
|
+ <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
+ Content of card tab {i}
|
|
|
+ </TabPane>
|
|
|
+ ))}
|
|
|
+ </Tabs>
|
|
|
+ );
|
|
|
+};
|
|
|
+```
|
|
|
+
|
|
|
+**Modify Arrow rendering position**
|
|
|
+
|
|
|
+Use `arrowPosition` to modify the overflow indicator position, optional start both end
|
|
|
+
|
|
|
+```jsx live=true dir=column
|
|
|
+import React from 'react';
|
|
|
+import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
|
+
|
|
|
+class App extends React.Component {
|
|
|
+ render() {
|
|
|
+ return (
|
|
|
+ <>
|
|
|
+ <Tabs style={{ width: '60%', margin: '20px' }} type="card" collapsible arrowPosition={'start'}>
|
|
|
+ {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => (
|
|
|
+ <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
+ Content of card tab {i}
|
|
|
+ </TabPane>
|
|
|
+ ))}
|
|
|
+ </Tabs>
|
|
|
+ <Tabs style={{ width: '60%', margin: '20px' }} type="card" collapsible arrowPosition={'both'}>
|
|
|
+ {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => (
|
|
|
+ <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
+ Content of card tab {i}
|
|
|
+ </TabPane>
|
|
|
+ ))}
|
|
|
+ </Tabs>
|
|
|
+ <Tabs style={{ width: '60%', margin: '20px' }} type="card" collapsible arrowPosition={'end'}>
|
|
|
+ {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9].map(i => (
|
|
|
+ <TabPane tab={`Tab-${i}`} itemKey={`Tab-${i}`} key={i}>
|
|
|
+ Content of card tab {i}
|
|
|
+ </TabPane>
|
|
|
+ ))}
|
|
|
+ </Tabs>
|
|
|
+ </>
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|
|
|
+```
|
|
|
+
|
|
|
### Disable
|
|
|
|
|
|
Disable one tab.
|
|
|
@@ -544,10 +655,9 @@ class App extends React.Component {
|
|
|
|
|
|
### Closeable
|
|
|
|
|
|
-Close a tab in the tab bar.
|
|
|
-Only card style tabs support the close option. Use `closable={true}` to turn it on.
|
|
|
+Close a tab in the tab bar. Only card style tabs support the close option. Use `closable={true}` to turn it on.
|
|
|
|
|
|
-```jsx live=true
|
|
|
+```jsx live=true
|
|
|
import React from 'react';
|
|
|
import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
|
|
|
|
|
@@ -559,21 +669,23 @@ class App extends React.Component {
|
|
|
{ tab: 'Doc', itemKey: '1', text: 'Doc', closable: true },
|
|
|
{ tab: 'Quick Start', itemKey: '2', text: 'Quick Start', closable: true },
|
|
|
{ tab: 'Help', itemKey: '3', text: 'Help' },
|
|
|
- ]
|
|
|
+ ],
|
|
|
};
|
|
|
}
|
|
|
close(key) {
|
|
|
const newTabList = [...this.state.tabList];
|
|
|
- const closeIndex = newTabList.findIndex(t=>t.itemKey===key);
|
|
|
+ const closeIndex = newTabList.findIndex(t => t.itemKey === key);
|
|
|
newTabList.splice(closeIndex, 1);
|
|
|
this.setState({ tabList: newTabList });
|
|
|
}
|
|
|
render() {
|
|
|
return (
|
|
|
<Tabs type="card" defaultActiveKey="1" onTabClose={this.close.bind(this)}>
|
|
|
- {
|
|
|
- this.state.tabList.map(t=><TabPane closable={t.closable} tab={t.tab} itemKey={t.itemKey} key={t.itemKey}>{t.text}</TabPane>)
|
|
|
- }
|
|
|
+ {this.state.tabList.map(t => (
|
|
|
+ <TabPane closable={t.closable} tab={t.tab} itemKey={t.itemKey} key={t.itemKey}>
|
|
|
+ {t.text}
|
|
|
+ </TabPane>
|
|
|
+ ))}
|
|
|
</Tabs>
|
|
|
);
|
|
|
}
|
|
|
@@ -584,77 +696,84 @@ class App extends React.Component {
|
|
|
|
|
|
### Tab
|
|
|
|
|
|
-Property | Description | Type | Default Value |
|
|
|
---- | --- | --- | --- |
|
|
|
-activeKey | The itemKey value of the currently active tab page | string | None |
|
|
|
-className | class name | string | None |
|
|
|
-collapsible | collapsed Tabs, **>=1.1.0** | boolean | false |
|
|
|
-contentStyle | The outer style object of the content area | CSSProperties | None |
|
|
|
-defaultActiveKey | Initialize the key value of the selected tab page | string | '1' |
|
|
|
-keepDOM | Whether to render the DOM structure of the hidden panel when using TabPane writing, **>=1.0.0** | boolean | true |
|
|
|
-lazyRender | Lazy rendering, only when the panel is activated will it be rendered in the DOM tree, **>=1.0.0** | boolean | false |
|
|
|
-more | Render a portion of the Tab into a drop-down menu ** >= 2.59.0** | number \| {count:number,render:()=>ReactNode,dropdownProps:DropDownProps} | - |
|
|
|
-renderTabBar | Used for secondary packaging tab bar | (tabBarProps: object, defaultTabBar: React.ComponentType) => ReactNode | None |
|
|
|
-preventScroll | Indicates whether the browser should scroll the document to display the newly focused element, acting on the focus method inside the component, excluding the component passed in by the user | boolean | | |
|
|
|
-size | Size, providing three types of `large`, `medium`, and `small`, **>=1.11.0, currently only supports linear Tabs** | string | `large` |
|
|
|
-style | style object | CSSProperties | None |
|
|
|
-tabBarExtraContent | Used to extend the content of the tab bar | ReactNode | None |
|
|
|
-tabList | An array of tab page objects that supports itemKey (corresponding to activeKey, tab (tab page text) and icon (tab page icon) | TabPane[] | None |
|
|
|
-tabPaneMotion | Whether to use animation to switch tabs | boolean | true |
|
|
|
-tabPosition | The position of the tab, support `top` (horizontal), `left` (vertical), **>=1.0.0** | string | `top` |
|
|
|
-type | The style of the label bar, optional `line`, `card`, `button` | string | `line` |
|
|
|
-onChange | Callback function when switching tab pages | function(activeKey: string) | None |
|
|
|
-onTabClick | Click event | function(key: string, e: Event) | None |
|
|
|
-onTabClose | executed when tab closed by user, **>=2.1.0** | function(tabKey: string) | None
|
|
|
+| Property | Description | Type | Default Value |
|
|
|
+| --- | --- | --- | --- |
|
|
|
+| activeKey | The itemKey value of the currently active tab page | string | None |
|
|
|
+| className | class name | string | None |
|
|
|
+| collapsible | collapsed Tabs, **>=1.1.0** | boolean | false |
|
|
|
+| visibleTabsStyle | Overall scrolling area style **>=2.61.0** | style: CSSProperties | None |
|
|
|
+| contentStyle | The outer style object of the content area | CSSProperties | None |
|
|
|
+| defaultActiveKey | Initialize the key value of the selected tab page | string | '1' |
|
|
|
+| keepDOM | Whether to render the DOM structure of the hidden panel when using TabPane writing, **>=1.0.0** | boolean | true |
|
|
|
+| lazyRender | Lazy rendering, only when the panel is activated will it be rendered in the DOM tree, **>=1.0.0** | boolean | false |
|
|
|
+| more | Render a portion of the Tab into a drop-down menu ** >= 2.59.0** | number \| {count:number,render:()=>ReactNode,dropdownProps:DropDownProps} | - |
|
|
|
+| renderTabBar | Used for secondary packaging tab bar | (tabBarProps: object, defaultTabBar: React.ComponentType) => ReactNode | None |
|
|
|
+| renderArrow | Customize how overflow items indicator are rendered externally. By default, the overflow items are expanded when the arrow button is hovered. **>=2.61.0** | (items: OverflowItem[],pos:"start"\|"end", handleArrowClick:()=>void)=> ReactNode | None |
|
|
|
+| preventScroll | Indicates whether the browser should scroll the document to display the newly focused element, acting on the focus method inside the component, excluding the component passed in by the user | boolean |
|
|
|
+| showRestInDropdown | Whether to display the collapsed Tab in the drop-down menu (only effective when collapsible is true) **>= 2.61.0** | boolean | true |
|
|
|
+| size | Size, providing three types of `large`, `medium`, and `small`, **>=1.11.0, currently only supports linear Tabs** | string | `large` |
|
|
|
+| style | style object | CSSProperties | None |
|
|
|
+| tabBarExtraContent | Used to extend the content of the tab bar | ReactNode | None |
|
|
|
+| tabList | An array of tab page objects that supports itemKey (corresponding to activeKey, tab (tab page text) and icon (tab page icon) | TabPane[] | None |
|
|
|
+| tabPaneMotion | Whether to use animation to switch tabs | boolean | true |
|
|
|
+| tabPosition | The position of the tab, support `top` (horizontal), `left` (vertical), **>=1.0.0** | string | `top` |
|
|
|
+| type | The style of the label bar, optional `line`, `card`, `button` | string | `line` |
|
|
|
+| onChange | Callback function when switching tab pages | function(activeKey: string) | None |
|
|
|
+| onTabClick | Click event | function(key: string, e: Event) | None |
|
|
|
+| onTabClose | executed when tab closed by user, **>=2.1.0** | function(tabKey: string) | None |
|
|
|
+| arrowPosition | Arrow rendering position **>=2.61.0** | "start" "end" "both" | 无 |
|
|
|
+| onVisibleTabsChange | Overflow item switching change callback **>=2.61.0** | (visibleState:Record\<string,bool\>)=>void | None |
|
|
|
|
|
|
### TabPane
|
|
|
|
|
|
-Property | Description | Type | Default Value |
|
|
|
---------- | ---------------- | ------------------ | ---- - |
|
|
|
-className | class name | string | None |
|
|
|
-disabled | Whether the tab bar is disabled | boolean | None |
|
|
|
-icon | Tab bar icon | ReactNode | None |
|
|
|
-itemKey | corresponding to `activeKey` | string | None |
|
|
|
-style | style object | CSSProperties | None |
|
|
|
-tab | Tab page bar display text | ReactNode | None |
|
|
|
-closable | whether user can close the tab **>=2.1.0** | boolean | false |
|
|
|
-
|
|
|
+| Property | Description | Type | Default Value |
|
|
|
+| --------- | ------------------------------------------ | ------------- | ------------- |
|
|
|
+| className | class name | string | None |
|
|
|
+| disabled | Whether the tab bar is disabled | boolean | None |
|
|
|
+| icon | Tab bar icon | ReactNode | None |
|
|
|
+| itemKey | corresponding to `activeKey` | string | None |
|
|
|
+| style | style object | CSSProperties | None |
|
|
|
+| tab | Tab page bar display text | ReactNode | None |
|
|
|
+| closable | whether user can close the tab **>=2.1.0** | boolean | false |
|
|
|
|
|
|
## Accessibility
|
|
|
|
|
|
### ARIA
|
|
|
-- About role
|
|
|
- - TabBar has a role of `tablist`
|
|
|
- - Tab in TabBar has a role of `tab`
|
|
|
- - TabPane has a role of `tabpanel`
|
|
|
-- aria-orientation: Indicates TabBar's orientation, can be `vertical` or `horizontal`. When tabPosition is `left`,aria-orientation will be `vertical`, when tabPosition is `top`, aria-orientation will be `horizontal`.
|
|
|
-- aria-disabled: When TabPane is disabled, the related Tab's aria-disabled will be set to true.
|
|
|
-- aria-selected: Indicates whether the Tab is selected.
|
|
|
-- aria-controls: Indicates the TabPane controlled by the Tab
|
|
|
-- aria-labelledby: Indicates the element labels the TabPane
|
|
|
+
|
|
|
+- About role
|
|
|
+ - TabBar has a role of `tablist`
|
|
|
+ - Tab in TabBar has a role of `tab`
|
|
|
+ - TabPane has a role of `tabpanel`
|
|
|
+- aria-orientation: Indicates TabBar's orientation, can be `vertical` or `horizontal`. When tabPosition is `left`,aria-orientation will be `vertical`, when tabPosition is `top`, aria-orientation will be `horizontal`.
|
|
|
+- aria-disabled: When TabPane is disabled, the related Tab's aria-disabled will be set to true.
|
|
|
+- aria-selected: Indicates whether the Tab is selected.
|
|
|
+- aria-controls: Indicates the TabPane controlled by the Tab
|
|
|
+- aria-labelledby: Indicates the element labels the TabPane
|
|
|
|
|
|
### Keyboard and Focus
|
|
|
+
|
|
|
WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
|
|
|
-- Tabs can be given focus, except for disabled tabs
|
|
|
-- Keyboard users can use the `Tab` key to move the focus to the tab panel of the selected tab element
|
|
|
-- Use `left and right arrows` to toggle options when focus is on a tab element in a horizontal tab list
|
|
|
-- Use `up and down arrows` to toggle options when focus is on a tab element in a vertical tab list
|
|
|
-- When the focus is on an inactive tab element in the tab list, the `Space` or `Enter` keys can be used to activate the tab
|
|
|
-- When keyboard users want to focus directly on the last tab element in the tab list:
|
|
|
- - Mac users: `fn` + `right arrow`
|
|
|
- - Windows users: `End`
|
|
|
-- When keyboard users want to focus directly on the first tab element in the tab list:
|
|
|
- - Mac users: `fn` + `left arrow`
|
|
|
- - Windows users: `Home`
|
|
|
-- When a tab is allowed to be deleted:
|
|
|
- - Users can use `Delete` keys to delete tab
|
|
|
- - After deletion, the focus is transferred to the next element of the deleted tab element; if the deleted element has no subsequent element, it is transferred to the previous element
|
|
|
+
|
|
|
+- Tabs can be given focus, except for disabled tabs
|
|
|
+- Keyboard users can use the `Tab` key to move the focus to the tab panel of the selected tab element
|
|
|
+- Use `left and right arrows` to toggle options when focus is on a tab element in a horizontal tab list
|
|
|
+- Use `up and down arrows` to toggle options when focus is on a tab element in a vertical tab list
|
|
|
+- When the focus is on an inactive tab element in the tab list, the `Space` or `Enter` keys can be used to activate the tab
|
|
|
+- When keyboard users want to focus directly on the last tab element in the tab list:
|
|
|
+ - Mac users: `fn` + `right arrow`
|
|
|
+ - Windows users: `End`
|
|
|
+- When keyboard users want to focus directly on the first tab element in the tab list:
|
|
|
+ - Mac users: `fn` + `left arrow`
|
|
|
+ - Windows users: `Home`
|
|
|
+- When a tab is allowed to be deleted:
|
|
|
+ - Users can use `Delete` keys to delete tab
|
|
|
+ - After deletion, the focus is transferred to the next element of the deleted tab element; if the deleted element has no subsequent element, it is transferred to the previous element
|
|
|
|
|
|
## Content Guidelines
|
|
|
-- Label copy needs to explain the label content accurately and clearly
|
|
|
-- Use short, easily distinguishable labels
|
|
|
-- try to stay within one word
|
|
|
|
|
|
+- Label copy needs to explain the label content accurately and clearly
|
|
|
+- Use short, easily distinguishable labels
|
|
|
+- try to stay within one word
|
|
|
|
|
|
## Design Token
|
|
|
|