Mixins / foldkit-mixins-ui

ProgressView

interface · packages/mixins-ui/src/progress.ts:44

interface ProgressView<Message> {
  readonly id: string
  readonly label: string
  readonly value: Option.Option<number> | ReadonlyArray<ProgressSection>
  readonly min?: number | undefined
  readonly max?: number | undefined
  readonly buffer?: number | undefined
  readonly segments?: number | undefined
  readonly valueText?:
    string | ((value: number, max: number) => string) | undefined
  readonly showValue?: boolean | undefined
  readonly style?: NamedStyle<typeof ProgressSlots> | undefined
  readonly mixins?: MixinList<Message> | undefined
}

Members

ProgressView.id

property · packages/mixins-ui/src/progress.ts:46

readonly id: string

Prefixes the ids the progress draws, unique on the page.

ProgressView.label

property · packages/mixins-ui/src/progress.ts:48

readonly label: string

What is in progress, shown and naming the bar.

ProgressView.value

property · packages/mixins-ui/src/progress.ts:53

readonly value: Option.Option<number> | ReadonlyArray<ProgressSection>

How far it is, from min to max: a number, none when that is not known, or the parts of a stacked bar, whose sum it is.

ProgressView.min

property · packages/mixins-ui/src/progress.ts:54

readonly min?: number | undefined

ProgressView.max

property · packages/mixins-ui/src/progress.ts:55

readonly max?: number | undefined

ProgressView.buffer

property · packages/mixins-ui/src/progress.ts:57

readonly buffer?: number | undefined

How far the work could go already, in the same range, drawn behind the fill.

ProgressView.segments

property · packages/mixins-ui/src/progress.ts:59

readonly segments?: number | undefined

Cuts a bar's track into this many equal steps.

ProgressView.valueText

property · packages/mixins-ui/src/progress.ts:61

readonly valueText?:
  string | ((value: number, max: number) => string) | undefined

The value as read aloud, when the number alone would not say it.

ProgressView.showValue

property · packages/mixins-ui/src/progress.ts:63

readonly showValue?: boolean | undefined

Shows the value: valueText when given, else the share as a percentage.

ProgressView.style

property · packages/mixins-ui/src/progress.ts:65

readonly style?: NamedStyle<typeof ProgressSlots> | undefined

A style of ProgressSlots, for the look.

ProgressView.mixins

property · packages/mixins-ui/src/progress.ts:67

readonly mixins?: MixinList<Message> | undefined

Mixins beside the style.