ToggleButton

Custom toggle button input.

Interface: IToggleButton.

See the parameters of this component in storybook.

Toggle button

Example

import {Actions, type IMessage, type IToggleButton} from "@onlyoffice/docspace-plugin-sdk"

const onChange = () => {
  toggleButtonProps.isChecked = !toggleButtonProps.isChecked

  const message: IMessage = {
    actions: [Actions.updateProps],
    newProps: toggleButtonProps,
  }
  return message
}

const libToggleButtonProps: IToggleButton = {
  isChecked: false,
  onChange,
  style: {position: "relative", gap: "0px"},
}

Get Help

  • If you have any questions about ONLYOFFICE DocSpace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).