Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: CC-BY-SA-4.0

crowd-toggle-button

A button that acts as an ON/OFF switch, toggling a state.

The following attributes are supported by this element.

A Boolean switch that, if present, displays the button switched to the ON position.

A Boolean switch that, if present, displays the button as disabled and prevents toggling.

When in an off position, a button using this attribute, will display in an alert color. The standard is red, but may be changed in CSS. When toggled on, the button will display in the same color as other buttons in the on position.

A string that is used to identify the answer submitted by the worker. This value matches a key in the JSON object that specifies the answer.

A Boolean switch that, if present, requires the worker to provide input.

A value used in the output as the property name for the element’s Boolean state. Defaults to “on” if not provided.

This element has the following parent and child elements. + Parent elements: crowd-form + Child elements: none

This element outputs the name as the name of an object, containing the value as a property name and the element’s state as Boolean value for the property. If no value for the element is specified, the property name defaults to “on.”

Example Sample output for this element

[
  {
    "theToggler": {
      "on": true
    }
  }
]

For more information, see the following. + Amazon SageMaker Ground Truth + HTML Elements Reference