import { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';

KbqProgressSpinner

componentCopy link to KbqProgressSpinner

Component that reports the progress of an ongoing operation.

@Component({ selector: 'kbq-progress-spinner' })
class KbqProgressSpinner extends KbqColorDirective {
readonly id = input<string>(
inject(_IdGenerator).getId('kbq-progress-spinner-')
);
readonly value = input<number>(0);
readonly mode = input<ProgressSpinnerMode>('determinate');
readonly size = input<ProgressSpinnerSize>('compact');
readonly color = input<T | null | undefined>();
get colorClassName(): string;
setDefaultColor(color: T): void;
}
idinputCopy link to idstring

Unique id of the spinner.

valueinputCopy link to valuenumber

Progress of the operation, in percent. Clamped to [0, 100] and only rendered in determinate mode.

Anything that is not a number reads as 0: the value feeds a stroke-dashoffset percentage, and a bare numberAttribute would turn a null binding into NaN%, which is not a length at all. The transform is typed rather than taking unknown, so [value]="progress$ | async" and value="40" keep type-checking while an object or an array stays a template type error.

modeinputCopy link to modeProgressSpinnerMode

Whether the spinner reports value or spins indefinitely.

sizeinputCopy link to sizeProgressSpinnerSize

Size of the spinner.

colorinputCopy link to colorT | null | undefined

Color of the component. A value set in code holds until the input changes, and the default color is used while both are unset or falsy.

colorClassNameCopy link to colorClassNamestring

current class name of color

setDefaultColor()Copy link to setDefaultColor()void

this color will be used as a default value. For example [color]="'' | false | undefined | null".

KbqProgressSpinnerCaption

directiveCopy link to KbqProgressSpinnerCaption

Directive that marks the caption of a progress spinner.

@Directive({ selector: '[kbq-progress-spinner-caption]' })
class KbqProgressSpinnerCaption {}

KbqProgressSpinnerText

directiveCopy link to KbqProgressSpinnerText

Directive that marks the text of a progress spinner.

@Directive({ selector: '[kbq-progress-spinner-text]' })
class KbqProgressSpinnerText {}

ProgressSpinnerMode

typeCopy link to ProgressSpinnerMode

Whether the spinner reports a known progress value or spins indefinitely.

type ProgressSpinnerMode = 'determinate' | 'indeterminate';

ProgressSpinnerSize

typeCopy link to ProgressSpinnerSize

Sizes supported by the progress spinner.

type ProgressSpinnerSize = Exclude<KbqDefaultSizes, 'normal'>;
Suggestions for improvement
If you found a mistake or want to improve the article, create an issue on GitHub.