SusIconRail
![]()
Vertical or horizontal strip of circular category / loadout items.
Package
SusKit · Atoms (commercial)
Props
| Name | Type | Default | |
|---|---|---|---|
Model | Prop<string> | "" | v-model |
Direction | Prop<string> | "vertical" | v-model |
Slots
No slots.
Events
| Name | Field | Payload |
|---|---|---|
Changed | OnChanged | string |
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
sus-icon-rail__iconsus-icon-rail__itemsus-icon-rail__item--activesus-icon-rail__item--disabledsus-icon-rail__item--hsus-icon-rail__labelsus-icon-rail--horizontalsus-icon-rail--vertical
Usage
csharp
var rail = new SusIconRail();
rail.SetLabels("W", "A", "Q", "M");
rail.Model.Value = "0";
rail.Direction.Value = "vertical";
rail.OnChanged += value => { /* … */ };Or build Items explicitly:
csharp
rail.Items.Value = new List<SusIconRail.RailItem>
{
new() { Label = "W", Value = "weapons", Icon = "sword" },
new() { Label = "A", Value = "armor", Icon = "shield" },
};
rail.Model.Value = "weapons";| Prop | Role |
|---|---|
Items | List<RailItem> — Label, Value, Icon, Disabled |
Model | Selected value |
Direction | vertical | horizontal |
OnChanged | Action<string> |
Notes
SetLabels(...)is a shortcut that fillsItemswith letter labels and index values.- Root layout often needs consumer USS: Sharq scoping can break self-target on
.sus-icon-rail.
See also Layout recipes.