Cogo Search Widget CDN

This is the CDN endpoint for the Cogo Search Widget embeddable bundle.

Available Files

search-widget-bundle.js search-widget-bundle.css

Usage

To embed this widget on your website, use the following code:

<!-- Load React dependencies -->
<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>

<!-- Widget container -->
<div id="search-widget-container"></div>

<!-- Load widget CSS -->
<link rel="stylesheet" href="https://cogo-discovery.pages.dev/search-widget-bundle.css">

<!-- Load widget JS -->
<script src="https://cogo-discovery.pages.dev/search-widget-bundle.js" onload="initializeWidget()"></script>

<!-- Initialize -->
<script>
function initializeWidget() {
    window.renderSearchWidget(
        document.getElementById('search-widget-container'),
        { theme: 'light' }
    );
}
</script>

View on GitHub