> For the complete documentation index, see [llms.txt](https://2600hz.gitbook.io/sds/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://2600hz.gitbook.io/sds/sds-components/simple-components/tab-group/code.md).

# Code

## Props

<table><thead><tr><th>Props</th><th width="359.66666666666663">Data Type</th><th>Required</th></tr></thead><tbody><tr><td>children</td><td>TabGroupElement</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td>className</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>defaultTab</td><td>number</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr></tbody></table>

### Default Tab

In the case a developer needs to show a specific Tab of the TabGroup Component at rendering, the developer can select which Tab to render at passing a numer from 1 and ahead, depending on the TabGroupElement components inserted inside the TabGroup.

### TabGroupElement

Children element to insert inside TabGroup component.

&#x20;Developers can insert as much TabGroupElement components as they want and based on that number, that is going to be the number of tabs to generated automatically.

<table><thead><tr><th>Props</th><th width="359.66666666666663">Data Type</th><th>Required</th></tr></thead><tbody><tr><td>children</td><td>HTML Tags<br>Custom Components</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td>className</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>title</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td></tr><tr><td>icon</td><td>string</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td>disabled</td><td>boolean</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr></tbody></table>

### className

This class is going to be added directly to the custom content section of the tab, where developers can insert custom structures.

### Example

```tsx
import React from 'react';
import {TabGroup, TabGroupElement} from '@2600hz/sds-react-components';

const Example = ()=>{
    return(
        <div className='container'>
            <TabGroup defaultTab={2}>
                <TabGroupElement title='First Tab'>
                    <p>Some random text...</p>
                </TabGroupElement>
                <TabGroupElement title='Second Tab'>
                    <p>Some random text...</p>
                </TabGroupElement>
                <TabGroupElement title='Third Tab'>
                    <p>Some random text...</p>
                </TabGroupElement>
            </TabGroup>
        </div>
    );
}

export default Example;
```

## Components Dependency

For this component elaboration there were used the following internal components:

* [Telicon](/sds/sds-components/simple-components/telicon.md)

## Live Demo <a href="#live-demo" id="live-demo"></a>

For detailed code usage documentation, see the Storybooks for each framework below.​

### React <a href="#react" id="react"></a>

{% embed url="<https://sipster-react-component-storybook.netlify.app/?path=%2Fstory%2Fgeneral-components-tab-group--basic-tab-group>" %}
