К содержимому

SusProgressLinear

SusProgressLinear

Горизонтальный bar прогресса — determinate, buffer, striped или indeterminate.

Пакет

SusKit · Атомы (коммерческий)

Открыть в песочнице

SusKit · Atoms

Свойства

ИмяТипПо умолчанию
ValueProp<float>0f
MaxProp<float>100f
HeightProp<float>4f
ColorProp<string>"primary"
BgColorProp<string>""
BgOpacityProp<float>1f
BufferValueProp<float>0f
IndeterminateProp<bool>false
ActiveProp<bool>true
StripedProp<bool>false
StreamProp<bool>false
ReverseProp<bool>false
AbsoluteProp<bool>false
ClickableProp<bool>false
RoundedProp<string>"md"
RoundedBarProp<bool>false
ChunkCountProp<int>0
ChunkGapProp<float>4f

Слоты

Имя
(по умолчанию)

События

ИмяПолеPayload
ValueChangedOnValueChangedfloat

Хуки стиля

Контракт USS-классов — внешний вид переопределяется без правки C#. Состояния переключаются этими классами:

  • sus-progress-linear
  • sus-progress-linear__background
  • sus-progress-linear__buffer
  • sus-progress-linear__chunk
  • sus-progress-linear__chunk-fill
  • sus-progress-linear__chunks
  • sus-progress-linear__content
  • sus-progress-linear__fill
  • sus-progress-linear__indeterminate
  • sus-progress-linear__indeterminate-bar
  • sus-progress-linear__stream
  • sus-progress-linear--absolute
  • sus-progress-linear--active
  • sus-progress-linear--chunked
  • sus-progress-linear--clickable
  • sus-progress-linear--color-danger
  • sus-progress-linear--color-info
  • sus-progress-linear--color-secondary
  • sus-progress-linear--color-success
  • sus-progress-linear--color-warning
  • sus-progress-linear--inactive
  • sus-progress-linear--indeterminate
  • sus-progress-linear--reverse
  • sus-progress-linear--rounded-bar
  • sus-progress-linear--stream
  • sus-progress-linear--striped

Использование

xml
<template>
  <sus:SusProgressLinear :Value="LoadPct.Value"
                         Max="100"
                         Color="primary"
                         Height="6"
                         Rounded="md" />
</template>

<script>
public Prop<float> LoadPct = new(65f);
</script>
csharp
var bar = new SusProgressLinear();
bar.Value.Value = 40f;
bar.BufferValue.Value = 70f;
bar.Color.Value = "success";
bar.Striped.Value = true;
// Indeterminate: bar.Indeterminate.Value = true;

Заметки

  • BufferValue рисует вторичную дорожку (например, буферизованное медиа).
  • ChunkCount / ChunkGap делят заполнение на сегменты.
  • Слот по умолчанию располагается поверх полосы — для инлайн-подписи.