diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md
index 9f3d4afc..2a39b52f 100644
--- a/COMPONENT_INDEX.md
+++ b/COMPONENT_INDEX.md
@@ -2838,13 +2838,14 @@ None.
### Props
-| Prop name | Kind | Reactive | Type | Default value | Description |
-| :--------- | :--------------- | :------- | :------------------- | ------------------ | --------------------------------------------- |
-| value | let
| No | number
| -- | Specify the current value |
-| max | let
| No | number
| 100
| Specify the maximum value |
-| labelText | let
| No | string
| ""
| Specify the label text |
-| hideLabel | let
| No | boolean
| false
| Set to `true` to visually hide the label text |
-| helperText | let
| No | string
| ""
| Specify the helper text |
+| Prop name | Kind | Reactive | Type | Default value | Description |
+| :--------- | :--------------- | :------- | :------------------- | ------------------------------------------------ | --------------------------------------------- |
+| value | let
| No | number
| -- | Specify the current value |
+| max | let
| No | number
| 100
| Specify the maximum value |
+| labelText | let
| No | string
| ""
| Specify the label text |
+| hideLabel | let
| No | boolean
| false
| Set to `true` to visually hide the label text |
+| helperText | let
| No | string
| ""
| Specify the helper text |
+| id | let
| No | string
| "ccs-" + Math.random().toString(36)
| Set an id for the progress bar element |
### Slots
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index 1ae514df..2f90e454 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -7441,6 +7441,16 @@
"isFunction": false,
"constant": false,
"reactive": false
+ },
+ {
+ "name": "id",
+ "kind": "let",
+ "description": "Set an id for the progress bar element",
+ "type": "string",
+ "value": "\"ccs-\" + Math.random().toString(36)",
+ "isFunction": false,
+ "constant": false,
+ "reactive": false
}
],
"slots": [
diff --git a/src/ProgressBar/ProgressBar.svelte b/src/ProgressBar/ProgressBar.svelte
index 44702f01..609aff6d 100644
--- a/src/ProgressBar/ProgressBar.svelte
+++ b/src/ProgressBar/ProgressBar.svelte
@@ -17,7 +17,9 @@
/** Specify the helper text */
export let helperText = "";
- let id = "ccs-" + Math.random().toString(36);
+ /** Set an id for the progress bar element */
+ export let id = "ccs-" + Math.random().toString(36);
+
let helperId = "ccs-" + Math.random().toString(36);
$: indeterminate = value === undefined;
diff --git a/types/ProgressBar/ProgressBar.d.ts b/types/ProgressBar/ProgressBar.d.ts
index bee6de56..bd1d7ed7 100644
--- a/types/ProgressBar/ProgressBar.d.ts
+++ b/types/ProgressBar/ProgressBar.d.ts
@@ -31,6 +31,12 @@ export interface ProgressBarProps
* @default ""
*/
helperText?: string;
+
+ /**
+ * Set an id for the progress bar element
+ * @default "ccs-" + Math.random().toString(36)
+ */
+ id?: string;
}
export default class ProgressBar extends SvelteComponentTyped<