Loading...
Installation
Install the following dependencies:
Copy and paste the following code into your project.
Loading...
Update the import paths to match your project setup.
Composition
<app-progress> ├── [appProgressLabel] (optional) ├── [appProgressTrack] │ └── [appProgressRange] ├── <svg appProgressCircle> (optional) │ ├── <circle appProgressCircleTrack> │ └── <circle appProgressCircleRange> ├── [appProgressValue] (optional) └── [appProgressView] (optional)
Examples
Circle
Loading...
Controlled
Loading...
Default
Loading...
API Reference
<app-progress>
Inputs
| Input | Type | Default | Description |
|---|---|---|---|
id | string | undefined | generated | Unique identifier used to create IDs for the progress parts. |
ids | Partial<ProgressElementIds> | undefined | — | Overrides generated identifiers for individual parts. |
value | number | null | undefined | — | Current value when controlled. Supports Angular two-way binding. |
defaultValue | number | null | undefined | midpoint of the range | Initial value when uncontrolled. Use null for indeterminate progress. |
min | number | undefined | 0 | Sets the minimum value. |
max | number | undefined | 100 | Sets the maximum value. |
orientation | "horizontal" | "vertical" | "horizontal" | Sets the linear progress orientation. |
formatOptions | Intl.NumberFormatOptions | undefined | { style: "percent" } | Configures the value exposed by [appProgressValue]. |
translations | ProgressIntlTranslations | undefined | — | Overrides accessible progress text. |
locale | string | undefined | current locale | Locale used to format the progress value. |
variant | "default" | "dashed" | "default" | Selects the projected track or a generated segmented track. |
segments | number | 10 | Sets the number of pieces generated by the dashed variant. |
Use [(value)]="value" for two-way binding, or pair [value] with (valueChange) when using
signals.
Outputs
| Output | Type | Description |
|---|---|---|
valueChange | number | null | undefined | Emits the updated controlled progress value. |
valueDetailsChange | ProgressValueChangeDetails | Emits details whenever the value changes. |
[appProgressView]
| Input | Type | Default | Description |
|---|---|---|---|
state | ProgressState | required | Shows the view only for the matching progress state. |
Context, Providers, and Utilities
| Export | Angular API |
|---|---|
ProgressRootProvider | Directive [progress-root-provider] providing an externally created API. |
ProgressContext | Structural directive [progress-context] exposing the root API to a template. |
useProgress(options) | Creates the signal-backed progress machine in an Angular injection context. |
injectProgressContext() | Injects the nearest progress root context. |
ProgressImports | Readonly collection containing the Angular progress UI and context helpers. |
Types
| Export | Description |
|---|---|
ProgressApi | Connected progress state and actions. |
ProgressElementIds | Overrides for generated progress part IDs. |
ProgressIntlTranslations | Accessible text used by the progress component. |
ProgressMachineProps | Configuration accepted by the underlying state machine. |
ProgressState | Derived progress state such as loading or complete. |
ProgressValueChangeDetails | Details emitted by valueDetailsChange. |
ProgressValueTranslationDetails | Details passed to custom value translations. |
ProgressViewProps | Properties used to configure a conditional view. |
UseProgressOptions | Options accepted by useProgress. |
UseProgressProps | Root properties supplied to useProgress. |
UseProgressReturn | Signal-backed machine returned by useProgress. |
Angular
React
Solid
Svelte
Vue