Repository navigation
Closed
Labels
scope: tools/scriptsScripts for supporting dev work, generating config and build artifacts, etc.status: PR in worksWork in Progress (WIP) Issues.
Description
where to use
-
(for a/b test)client/src/components/Donation/duration-amount-options.tsx -
client/src/templates/Challenges/classic/mobile-layout.tsx
<Tabs
activeKey={currentTab}
defaultActiveKey={currentTab}
id='mobile-layout'
onSelect={this.switchTab}
>
{/* omit something */}
<TabPane
eventKey={Tab.Editor}
title={i18next.t('learn.editor-tabs.code')}
{...editorTabPaneProps}
>
{/* omit something */}
{editor}
</TabPane>
<TabPane
eventKey={Tab.Console}
title={i18next.t('learn.editor-tabs.tests')}
{...editorTabPaneProps}
>
{testOutput}
</TabPane>
{/* omit something */}
</Tabs>Props interface
Tabs
| Name | Type | Default | Description |
|---|---|---|---|
activeKey |
string |
number |
|
animation |
boolean |
true | Sets if Fade animation strategy |
| id | string |
||
| onSelect | function |
Callback fired when a Tab is selected |
Tab
| Name | Type | Default | Description |
|---|---|---|---|
disabled |
boolean |
Use false to disable |
|
title |
node |
TabPane
| Name | Type | Default | Description |
|---|---|---|---|
eventKey |
string |
number |
|
title |
|||
mountOnEnter |
Wait until the first "enter" transition to mount the tab (add it to the DOM) | ||
unmountOnExit |
Unmount the tab (remove it from the DOM) when it is no longer visible |
Screenshots
| Status | Light theme | Dark theme |
|---|---|---|
| selected | ![]() |
![]() |
| unselected | ![]() |
![]() |
Current specs
Tabs
- Themes:
- Light
- Dark
Tab
- Font-family:
Roboto Mono, monospace - States:
- disabled
- selected
TabPane
- display:
- block
- hidden
Spacing and typography
Tabs
Tab
- border:
1px - border-color:
transparent - border-bottom-color:
#ddd - margin-right:
2px - padding:
5px 10px - font-size:
0.8em - font-color:
--foreground-secondary: var(--gray05)
| Status | Spacing and typography |
|---|---|
| selected | border-top-color: #dddborder-right-color: #dddborder-left-color: #dddbackground-color: --background-quaternary |
| unselected | border-bottom-color: #ddd |
TabPane
| Status | Spacing and typography |
|---|---|
| selected | display: block |
| unselected | display: none |
rough delivery plan
- basic fCC Tailwind style Uncontrolled Tabs - feat(ui-components): implement Tabs components #47313
- add
disableprop - add Fade
animation, and could setfalse - basic controlled Tabs, add
onSelect -
mountOnEnterandunmountOnExit - implement TabPane (this part of the details still need to continue to discuss)
Metadata
Metadata
Assignees
Labels
scope: tools/scriptsScripts for supporting dev work, generating config and build artifacts, etc.status: PR in worksWork in Progress (WIP) Issues.





Activity
ahmaxed commentedon Aug 12, 2022
@masterX89, thanks for researching the
Tabscomponent and opening this detailed issue. Solid work here.Here are a few nitpicks:
mobile-layout.tsxonly.bsStylecould be removed since it is not used inmobile-layout.tsxmountOnEnterin theTabscomponent, it should be removed.Tabcomponent could be removed.Tabsand `TabmasterX89 commentedon Aug 19, 2022
@ahmadabdolsaheb Thanks for the suggestions, I modified the content of the issue according to the suggestions and tried to implement basic
Tabscomponent. If there is anything that can be improved please let me know.Thanks in advance :)
rahulxdemon commentedon Aug 4, 2023
I would like to work on this issue
ahmaxed commentedon Aug 7, 2023
Thanks for your interest, @Rahul-Palamarthi. There is a pull request associated with this issue. If you enjoy creating components, I recommend finding an available component from this issue and working on it.
#44668