Tabs
import {Tab,TabLabel,TabList,TabPanel,TabPanels,Tabs,} from "@qui/react-vscode"
Examples
Showcase
Dark Modern
Problems panel
Output panel
Terminal panel
Ports panel
import {ReactNode} from "react"import {Tab,TabLabel,TabList,TabPanel,TabPanels,Tabs,} from "@qui/react-vscode"export default function Showcase(): ReactNode {return (<Tabs><TabList><Tab><TabLabel>PROBLEMS</TabLabel></Tab><Tab><TabLabel>OUTPUT</TabLabel></Tab><Tab disabled><TabLabel>TERMINAL</TabLabel></Tab><Tab><TabLabel>PORTS</TabLabel></Tab></TabList><TabPanels><TabPanel>Problems panel</TabPanel><TabPanel>Output panel</TabPanel><TabPanel>Terminal panel</TabPanel><TabPanel>Ports panel</TabPanel></TabPanels></Tabs>)}
API
TabsProps
| Name & Description | Option(s) | Default |
|---|---|---|
Governs the horizontal placement of the tablist relative to the panel
content. |
| 'start' |
The component used for the root node. It can be a React component or element. |
| 'div' |
ReactNode | ||
The initial index of the selected tab. |
| |
id attribute. If
omitted, a unique identifier will be automatically generated for accessibility. |
| |
The index of the selected tab (in controlled mode) |
| |
The lazy behavior of tab panel content when not active. |
| 'off' |
If true, each tab will be manually activated and display its panel by
pressing Space or Enter.If false, each tab will be automatically activated and their panel is
displayed when they receive focus. |
| false |
Callback fired when the index (controlled or un-controlled) changes. The callback includes a reason parameter which indicates why the event
was fired: |
|
Type
| 'start'| 'end'
Default
'start'
Description
Governs the horizontal placement of the tablist relative to the panel
content.
Type
| ElementType| ComponentType
Default
'div'
Description
The component used for the root node. It can be a React component or element.
Type
number
Description
The initial index of the selected tab.
Type
string
Description
id attribute. If
omitted, a unique identifier will be automatically generated for accessibility.
Type
number
Description
The index of the selected tab (in controlled mode)
Type
| 'unmount'| 'keepMounted'| 'off'
Default
'off'
Description
The lazy behavior of tab panel content when not active.
Type
boolean
Default
false
Description
If
If
true, each tab will be manually activated and display its panel by
pressing Space or Enter.If
false, each tab will be automatically activated and their panel is
displayed when they receive focus.Type
(index: number,reason: 'select' | 'reset',event?:| MouseEvent| KeyboardEvent<any>,) => void
Description
Callback fired when the index (controlled or un-controlled) changes.
The callback includes a
The callback includes a
reason parameter which indicates why the event
was fired:TabListProps
TabProps
| Name & Description | Option(s) | Default |
|---|---|---|
The component used for the root node. It can be a React component or
element. |
| 'button' |
ReactNode | ||
If true, the component is disabled and not clickable. |
| false |
id attribute. If
omitted, a unique identifier will be automatically generated for
accessibility. |
| |
If true, the component is focusable but not clickable. |
| false |
Type
| ElementType| ComponentType
Default
'button'
Description
The component used for the root node. It can be a React component or
element.
Type
boolean
Default
false
Description
If
true, the component is disabled and not clickable.Type
string
Description
id attribute. If
omitted, a unique identifier will be automatically generated for
accessibility.
Type
boolean
Default
false
Description
If
true, the component is focusable but not clickable.TabPanelsProps
TabPanelProps
Type
| ElementType| ComponentType
Default
'div'
Description
The component used for the root node. It can be a React component or
element.
Type
string
Description
id attribute. If
omitted, a unique identifier will be automatically generated for
accessibility.