Use and configuration
<!-- load react -->
<script src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<!-- load openstad component -->
<link rel="stylesheet" type="text/css" href="/components/dist/css/choices-guide.css"/>
<script src="/components/dist/choices-guide.js"></script>
<script>
window.addEventListener('load', function(e) {
// configure
var config = {
divId: "choices-guide",
siteId: 1,
choicesGuideId: 1,
api: {
"url": "https://api.openstad.yourdomain.nl",
},
};
// load in page
var element = document.querySelector('.openstad-component-choices-guide');
OpenStadComponents['choices-guide'].ChoicesGuide.renderElement(element, config);
});
</script>
<!-- container div -->
<div class="openstad-component-choices-guide"></div>Configuration
Examples
Last updated
Was this helpful?