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'