布局配方
用于 top-nav 和 character/loadout 屏幕的 chrome / layout 原子组件的简短配方。Storybook:Samples~/Storybook(icon-rail、wedge-slider、parallax-stack、app-bar)。
SusIconRail
垂直(默认)或水平的圆形项目类别 / loadout 条带。
| Prop | 作用 |
|---|---|
Items | List<RailItem> —— Label、Value、Icon、Disabled |
Model | 已选中的 Value(或索引字符串) |
Direction | vertical | horizontal |
OnChanged | Action<string> |
根节点布局可能需要消费方的 USS 覆盖:Sharq scoping 会破坏 .sus-icon-rail 上的 self-target,请将不带 scope 的根级规则放在 companion / theme USS 中。
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
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
SusWedgeSlider
分段式“volume wedge”(上升条形)。沿行点击可设置已填充的分段数量。
| Prop | 作用 |
|---|---|
Label | 可选说明文字 |
Value / Segments | 已填充数量 0…Segments |
ShowValue / ValueText | 数值显示 |
Disabled | 阻止输入 |
OnChanged | Action<int> |
辅助方法:Bind(label, filled, segments = 10)。
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
sus-wedge-slidersus-wedge-slider__labelsus-wedge-slider__rowsus-wedge-slider__row--growsus-wedge-slider__segsus-wedge-slider__seg--h1sus-wedge-slider__seg--h10sus-wedge-slider__seg--h11sus-wedge-slider__seg--h12sus-wedge-slider__seg--h13sus-wedge-slider__seg--h14sus-wedge-slider__seg--h15sus-wedge-slider__seg--h16sus-wedge-slider__seg--h2sus-wedge-slider__seg--h3sus-wedge-slider__seg--h4sus-wedge-slider__seg--h5sus-wedge-slider__seg--h6sus-wedge-slider__seg--h7sus-wedge-slider__seg--h8sus-wedge-slider__seg--h9sus-wedge-slider__seg--onsus-wedge-slider__valuesus-wedge-slider__wrapsus-wedge-slider--disabled
SusParallaxStack
由指针驱动的分层堆叠:bg → pattern → subject → ui(tips) → chrome。
| Prop | 作用 |
|---|---|
PatternAmp / SubjectAmp / UiAmp | 视差幅度(px) |
构建后调用 EnsureLayers() 以解析出 Bg、Pattern、Subject、Ui、TipHost、Chrome。将子元素添加到这些层中;堆叠会自行处理指针移动与插值(lerp)。
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
sus-parallax-stacksus-parallax-stack__bgsus-parallax-stack__chromesus-parallax-stack__patternsus-parallax-stack__subjectsus-parallax-stack__tipssus-parallax-stack__uisus-parallax-stack--off
SusAppBar
带有 prepend / 默认 / append 插槽的顶部条(在 Prominent 时还可有可选的 extension)。
| Prop | 作用 |
|---|---|
Title | 内容中的标签 |
Density | default | compact | comfortable |
Color | primary | secondary | … | surface |
Flat / Absolute / Prominent | 视觉 / 位置修饰符 |
配方: 默认插槽 = SusTabs;append 插槽 = 货币 / 操作用的 SusChip(参见 Storybook 中的 app-bar)。
样式钩子
USS 类契约 — 无需改 C# 即可覆盖外观。状态通过这些类切换:
sus-app-barsus-app-bar__appendsus-app-bar__contentsus-app-bar__extensionsus-app-bar__prependsus-app-bar__rowsus-app-bar__titlesus-app-bar--absolutesus-app-bar--dangersus-app-bar--density-comfortablesus-app-bar--density-compactsus-app-bar--flatsus-app-bar--infosus-app-bar--primarysus-app-bar--prominentsus-app-bar--secondarysus-app-bar--successsus-app-bar--surfacesus-app-bar--warningsus-slot