diff --git a/packages/checkbox-group/README.md b/packages/checkbox-group/README.md index 23ba3451d..d69e439fb 100644 --- a/packages/checkbox-group/README.md +++ b/packages/checkbox-group/README.md @@ -209,3 +209,28 @@ export const helpText = () => html` `; ``` + +### Event + +You can listen to the `model-value-changed` event whenever the value of the checkbox group is changed. + +```js preview-story +export const event = () => html` + + (document.getElementById('selectedDinosaur').innerText = JSON.stringify( + e.target.modelValue, + null, + 4, + ))} + > + + + + +
+ Selected scientists: N/A +`; +``` diff --git a/packages/radio-group/README.md b/packages/radio-group/README.md index d26d73f06..2d1791cc4 100644 --- a/packages/radio-group/README.md +++ b/packages/radio-group/README.md @@ -206,3 +206,24 @@ export const helpText = () => html` `; ``` + +### Event + +You can listen to the `model-value-changed` event whenever the value of the radio group is changed. + +```js preview-story +export const event = () => html` + + (document.getElementById('selectedDinosaur').innerText = e.target.modelValue)} + > + + + + +
+ Selected dinosaur: N/A +`; +```