How to use @typeform/embed - 7 common examples

To help you get started, we’ve selected a few @typeform/embed examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alexgarces / react-typeform-embed / src / components / ReactTypeformEmbed / index.js View on Github external
autoOpen,
      autoClose,
      onSubmit
    };

    // Popup Mode
    if (popup) {
      // Load Typeform embed popup
      this.typeform = typeformEmbed.makePopup(url, options);

      // Widget Mode (default)
    } else {
      const elm = this.typeformElm;

      // Load Typeform embed widget
      typeformEmbed.makeWidget(elm, url, options);
    }
  }
github alexgarces / react-typeform-embed / src / components / ReactTypeformEmbed / index.js View on Github external
const options = {
      hideHeaders,
      hideFooter,
      opacity,
      buttonText,
      mode,
      autoOpen,
      autoClose,
      onSubmit
    };

    // Popup Mode
    if (popup) {
      // Load Typeform embed popup
      this.typeform = typeformEmbed.makePopup(url, options);

      // Widget Mode (default)
    } else {
      const elm = this.typeformElm;

      // Load Typeform embed widget
      typeformEmbed.makeWidget(elm, url, options);
    }
  }
github p2pu / learning-circles / frontend / learner-survey.jsx View on Github external
const course = encodeURIComponent(element.dataset.course);
const contact = encodeURIComponent(element.dataset.contact);
const goalRating = encodeURIComponent(element.dataset.goalRating);
const learnerUuid = element.dataset.learnerUuid
const facilitator = encodeURIComponent(element.dataset.facilitatorName)
const goalmet = element.dataset.goalMet;
const url = `https://p2pu.typeform.com/to/${surveyId}?studygroup_uuid=${studygroupUuid}&studygroup_name=${studygroupName}&course=${course}&goal_rating=${goalRating}&learner_uuid=${learnerUuid}&facilitator=${facilitator}`;


const options = {
  onSubmit: () => {
    window.location.href = 'done'
  }
}

typeformEmbed.makeWidget(element, url, options);
github p2pu / learning-circles / frontend / facilitator-survey.jsx View on Github external
goal,
  goal_rating,
  attendance_1,
  attendance_2,
  attendance_n,
};
var queryString = Object.keys(params).map(key => key + '=' + params[key]).join('&');
const url = `https://p2pu.typeform.com/to/${surveyId}?${queryString}`;

const options = {
  onSubmit: () => {
    window.location.href = '/en/facilitator_survey/done/'
  }
}

typeformEmbed.makeWidget(element, url, options);
github codesandbox / codesandbox-client / packages / app / src / app / pages / common / Modals / SurveyModal / SurveyModal.tsx View on Github external
const initializeTypeform = (el?: HTMLDivElement) => {
    if (el) {
      typeformEmbed.makeWidget(
        el,
        `https://codesandbox.typeform.com/to/LYbjII?userid=${hash(
          user.id
        )}&ispatron=${isPatron}`,
        {
          opacity: 0,
          hideScrollbars: true,
          hideFooter: true,
          hideHeaders: true,
          onSubmit: () => {
            setTimeout(() => {
              modalClosed();
            }, 3000);
          },
        }
      );
github Opentrons / opentrons / protocol-designer / src / components / modals / GateModal / SignUpForm.js View on Github external
componentDidMount() {
    makeWidget(this.embedElement.current, SIGNUP_TYPEFORM_URL, {
      hideScrollbars: true,
    })
  }
  render() {
github appbaseio / dashboard / src / components / PricingTable / Unsubscribe.js View on Github external
embedTypescriptWidget = () => {
		this.setState({ typeFormStep: TYPE_FORM.LOADED });
		if (this.myRef.current) {
			typeformEmbed.makeWidget(
				this.myRef.current,
				'https://siddharth31.typeform.com/to/QEktta',
				{
					hideFooter: true,
					hideHeaders: true,
					opacity: 0,
					onSubmit: () => {
						this.setState({ typeFormStep: TYPE_FORM.SUBMITTED });
					},
				},
			);
		}
	};

@typeform/embed

**Typeform/embed** is the core embed library that lets you embed typeforms to your website using vanilla JavaScript.

MIT
Latest version published 1 month ago

Package Health Score

89 / 100
Full package analysis

Popular @typeform/embed functions