<PrimerTab OnTabSelected="OnTabSelected" Selected="code">
<PrimerTabItem Label="Code" Value="code" />
<PrimerTabItem Label="Issues" Value="issues" Counter="42" />
<PrimerTabItem Label="Pull Requests" Value="prs" />
<PrimerTabItem Value="projects" Label="Projects">
<Icon>
<PrimerIcon Icon="IconName.Project16" Size="IconSize.Small" />
</Icon>
</PrimerTabItem>
<PrimerTabItem Label="Actions" Value="actions" />
</PrimerTab>
Available options for Tab and TabItem components
Name | Description | Default Value | CSS Class |
---|---|---|---|
Label | Tab text label | - | - |
Value | Unique value associated with the tab | - | - |
Counter | Optional counter badge | null | Counter |
Icon | Optional icon next to label | null | - |
Selected | Initially selected tab value | null | - |
OnTabSelected | Callback when a tab is selected | - | - |
void OnTabSelected(string selectedTab)
{
Console.WriteLine($"Selected tab: {selectedTab}");
}