Skip to content

SusTabs

SusTabs

Tabbed navigation strip — Items + active Model.

Package

SusKit · Atoms (commercial)

Open in Playground

SusKit · Atoms

Props

NameTypeDefault
ModelProp<string>""v-model
ColorProp<string>"primary"v-model
AlignProp<string>"start"v-model
DirectionProp<string>"horizontal"v-model
GrowProp<bool>falsev-model
SliderVisibleProp<bool>truev-model

Slots

Name
(default)

Events

NameFieldPayload
TabChangedOnTabChangedstring

Style hooks

USS class contract — override appearance without touching C#. States toggle via these classes:

  • keyboard-focus
  • sus-tabs
  • sus-tabs__content
  • sus-tabs__header
  • sus-tabs__slider
  • sus-tabs__tab
  • sus-tabs__tab--active
  • sus-tabs__tab--disabled
  • sus-tabs__tab-icon
  • sus-tabs__tab-label
  • sus-tabs--align-center
  • sus-tabs--align-end
  • sus-tabs--align-start
  • sus-tabs--danger
  • sus-tabs--grow
  • sus-tabs--primary
  • sus-tabs--secondary
  • sus-tabs--success
  • sus-tabs--vertical

Usage

csharp
var tabs = new SusTabs();
tabs.Items.Value = new List<SusTabs.TabItem>
{
    new() { Title = "Overview", Value = "overview", Icon = "house" },
    new() { Title = "Loadout", Value = "loadout", Icon = "backpack" },
    new() { Title = "Stats", Value = "stats", Icon = "chart-bar" },
};
tabs.Model.Value = "overview";
tabs.Color.Value = "primary";
tabs.Align.Value = "start";
tabs.SliderVisible.Value = true;
tabs.OnTabChanged += value => { /* … */ };
PropRole
ItemsList<TabItem>Title, Value, Icon, Disabled
ModelActive tab value
Alignstart · center · end
Directionhorizontal · vertical
GrowStretch tabs to fill width

Notes

  • Default slot is the tab panel host; switch content from OnTabChanged / Model.