From 3addc7b2ea3eede62da22b56da10a00bd9aa43b1 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 15 Nov 2024 16:48:18 +0100 Subject: [PATCH] Document toggle button webcomponent Closes #479 --- docs/javascript/components_toggle_button.md | 29 +++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 30 insertions(+) create mode 100644 docs/javascript/components_toggle_button.md diff --git a/docs/javascript/components_toggle_button.md b/docs/javascript/components_toggle_button.md new file mode 100644 index 00000000..3c84ff4f --- /dev/null +++ b/docs/javascript/components_toggle_button.md @@ -0,0 +1,29 @@ +# Toggle Button + +A toggle button is a control used for switching (or toggling) between two states or options. + +## Example + +```html + +``` + +## Parameters + +### `checked` + +Indicates that the button is active. + +### `name` + +The name of the button. +If the button is part of a form, the name is used to transmit the value when the form is sent. + +### `value` + +The value that should be transmitted when the form is sent if the button is active. + +Defaults to `1`. diff --git a/mkdocs.yml b/mkdocs.yml index 75acd5a3..cc7b9a7f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -69,6 +69,7 @@ nav: - 'Notices': 'javascript/components_notice.md' - 'Pagination': 'javascript/components_pagination.md' - 'RPC API': 'javascript/components_rpc_api.md' + - 'Toggle Button': 'javascript/components_toggle_button.md' - 'New API': - 'Writing a module': 'javascript/new-api_writing-a-module.md' - 'Core Functions': 'javascript/new-api_core.md' -- 2.20.1