Calendly provides this embed code that gets added to the page and displays calendar options to choose from.
<div class="calendly-inline-widget" data-url="https://calendly.com/username" style="min-width:320px;height:580px;"></div>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
I can't figure out the way to embed this code into the component. What's the best way to do so here?
import React, { Component} from "react";
class Calendly extends Component {
ComponentDidMount( )
render(){
return (
<div>
<div id="schedule_form">
</div>
</div>
);
}
};
export default Calendly;
You can add your Calendly booking flow directly to your website, so your site visitors can schedule with you without leaving your site. You can choose from three customizable embed options.
We currently provide three APIs for you to integrate Calendly into your application: API v2: Our current, actively maintained API. The Calendly API v2 is REST-based and has predictable resource-oriented URLs.
You can use this package react-calendly
and just pass in the calendly url
import { InlineWidget } from 'react-calendly';
const App = () => {
return <InlineWidget url="yourcalendlyurl"/>
}
export default App
and you're good to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With