psytask - v1.1.1
    Preparing search index...

    Function Checkbox

    • Checkbox component for boolean values

      Parameters

      Returns { node: HTMLDivElement; data: () => { value: boolean } }

      using consentField = app.scene(Checkbox, {
      defaultProps: {
      id: 'consent',
      label: 'I consent to participate in this study',
      validate: (value) => value || 'You must provide consent to continue',
      },
      });
      const data = await consentField.show();
      console.log(data.value); // boolean