Ui Tookit - Tab and TabView code example

Hi there,

I noticed Tab and TabView in Beta version.
Is there any code example or documentaiton to use it?

Thanks

I attached a picture to possibly help out.

You have a Tab View be the container of the tabs themselves.
The Tabs act as the container for the content you want in the actual Tab.

1 Like

Thanks appreciate that :slight_smile:

No problem at all.

Are you needing code examples with this or are you okay with just the UI Builder pic?
If you need code examples are you wanting pure C# based, a mix of C#/UI builder, or are you curious about how to handle the UXML with the new properties bag?

I might be able to whip something up for you now that the API won’t be changing a lot since we are out of Alpha for 2023.2.

1 Like

Im actually using uxml approach, and it worked well.
Really appreciate :slight_smile:

We published some updated docs for this recently

2 Likes

Thanks for updating the documentation, very useful

1 Like

Can Tab View be configured to do vertical tabs?

Hi @pzolla !

Yes, to get started on vertical tabs, you can do something like:

.unity-tab-view {
    flex-direction: row;
}

.unity-tab-view__header-container {
    flex-direction: column;
}

.unity-tab__header-underline {
    height: 100%;
    width: 2px;
}

Hope this helps!

1 Like

var tab_1 = new Tab(“Tab1”,TabIconImage_1); How to modify the size of TabIconImage_1 in TabView?

How to place anything into tabview???
9790773--1405113--upload_2024-4-24_15-40-43.png

Ok, figured out that I need to hover over tabview not tabview-content-container.