diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 068af834..7d15b938 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -463,6 +463,7 @@ None. | :------------ | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | ------------------------------------------------- | | ref | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | | checked | let | Yes | boolean | false | Specify whether the checkbox is checked | +| value | let | No | string | "" | Specify the value of the checkbox | | indeterminate | let | No | boolean | false | Specify whether the checkbox is indeterminate | | skeleton | let | No | boolean | false | Set to `true` to display the skeleton state | | readonly | let | No | boolean | false | Set to `true` for the checkbox to be read-only | diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index ea62c0b5..7435dbd5 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -708,6 +708,17 @@ "moduleName": "Checkbox", "filePath": "src/Checkbox/Checkbox.svelte", "props": [ + { + "name": "value", + "kind": "let", + "description": "Specify the value of the checkbox", + "type": "string", + "value": "\"\"", + "isFunction": false, + "isFunctionDeclaration": false, + "constant": false, + "reactive": false + }, { "name": "checked", "kind": "let", diff --git a/src/Checkbox/Checkbox.svelte b/src/Checkbox/Checkbox.svelte index 41af3a8a..bf2a00a1 100644 --- a/src/Checkbox/Checkbox.svelte +++ b/src/Checkbox/Checkbox.svelte @@ -3,6 +3,9 @@ * @event {boolean} check */ + /** Specify the value of the checkbox */ + export let value = ""; + /** Specify whether the checkbox is checked */ export let checked = false; @@ -69,6 +72,7 @@