# Tabs

**Tabs make it easy to explore and switch between different views.**

Tabs organize and allow navigation between groups of content that are related and at the same level of hierarchy.

## Tabs

![](https://2374445323-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6jY7sXTmhiAIMGYw_m%2F-MAgDDtlz7vhocNS49ln%2F-MAgIJMrllxj5aJvi82N%2Fimage.png?alt=media\&token=345d298f-aa64-4d72-81a5-5098a2b25d48)

```
New-UDTabs -Tabs {
    New-UDTab -Text 'Item One' -Content { New-UDTypography -Text 'Item One' -Variant 'h2' }
    New-UDTab -Text 'Item Two' -Content { New-UDTypography -Text 'Item Two' -Variant 'h2' }
    New-UDTab -Text 'Item Three' -Content { New-UDTypography -Text 'Item Three' -Variant 'h2' }
}
```

## Vertical Tabs

![](https://2374445323-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6jY7sXTmhiAIMGYw_m%2F-MAgDDtlz7vhocNS49ln%2F-MAgIR6blXjAG7vBiFhl%2Fimage.png?alt=media\&token=a676e69b-4f79-4051-8ebc-dde4374b1f7a)

```
New-UDTabs -Tabs {
    New-UDTab -Text 'Item One' -Content { New-UDTypography -Text 'Item One' -Variant 'h2' }
    New-UDTab -Text 'Item Two' -Content { New-UDTypography -Text 'Item Two' -Variant 'h2' }
    New-UDTab -Text 'Item Three' -Content { New-UDTypography -Text 'Item Three' -Variant 'h2' }
} -Orientation vertical
```

## Dynamic Tabs

Dynamic tabs will refresh their content when they are selected. You will need to include the `-RenderOnActive` parameter to prevent all the tabs from rendering even if they are not shown.

```
New-UDTabs -Tabs {
    New-UDTab -Text 'Item One' -Content { Get-Date } -Dynamic
    New-UDTab -Text 'Item Two' -Content { Get-Date } -Dynamic
    New-UDTab -Text 'Item Three' -Content { Get-Date } -Dynamic
} -RenderOnActive
```

**New-UDTabs**

| Name           | Type            | Description                                                                                                                           | Required |
| -------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| Tabs           | ScriptBlock     | The tabs to put within this container.                                                                                                | true     |
| Id             | String          | The ID of the component. It defaults to a random GUID.                                                                                | false    |
| RenderOnActive | SwitchParameter | Whether to render the tabs when they are clicked. Is this value isn't present, all the tabs are rendered, even if they are not shown. | false    |
| Orientation    | String          | The orientation of the tabs.                                                                                                          | false    |

**New-UDTab**

| Name    | Type        | Description                                          | Required |
| ------- | ----------- | ---------------------------------------------------- | -------- |
| Text    | string      | The text to display in the header.                   | false    |
| Content | scriptblock | The content of the tab.                              | true     |
| Id      | string      | The ID of the tab.                                   | false    |
| Dynamic | switch      | A dynamic tab will reload every time it is selected. | false    |
| Icon    | Object      |                                                      | false    |
| Stacked | switch      |                                                      | false    |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powershelluniversal.com/v1/dashboard/components/navigation/tabs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
