🎬 Storyfyd SDK v2.0

Iframe Architecture Demo

βœ… SDK Loaded

πŸ—οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Client Page (this demo) β”‚ β”‚ β”‚ β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎯 Live Widget Demo

Story circles will appear below (loaded from API):

πŸ“Š Event Log

Waiting for events...

πŸ’» Integration Code

Simple Web Component Integration

<!-- Load the SDK --> <script src="https://cdn.storyfyd.com/sdk/storyfyd-web.js"></script> <!-- Add the widget --> <storyfyd-web></storyfyd-web> <script> const storyfydWeb = document.querySelector('storyfyd-web'); storyfydWeb.init({ token: 'YOUR_TOKEN', apiBaseUrl: 'https://api.storyfyd.com', debug: true, layout: { view: 'classic', style: { width: '80px', height: '80px' } }, onReady: () => console.log('Ready!'), onStoryOpen: (data) => console.log('Story opened', data), onStoryClosed: () => console.log('Story closed'), onStoryChanged: (data) => console.log('Story changed', data), onInteraction: (data) => console.log('Interaction', data), onError: (error) => console.error('Error', error) }); </script>

πŸ“š API Reference

// Get the element const storyfydWeb = document.querySelector('storyfyd-web'); // Initialize storyfydWeb.init(config); // Destroy storyfydWeb.destroy();