blob: f8b7ad4f679a8c827c16f80d7625c01acf803072 [file] [log] [blame]
Sean McCullough86b56862025-04-18 13:04:03 -07001<html>
2 <head>
3 <title>sketch-timeline demo</title>
4 <link rel="stylesheet" href="demo.css" />
Sean McCullough71941bd2025-04-18 13:31:48 -07005 <script
6 src="/dist/web-components/sketch-timeline.js"
7 type="module"
8 ></script>
Sean McCullough86b56862025-04-18 13:04:03 -07009
10 <script>
11 const messages = [
12 {
13 type: "user",
14 content: "a user message",
15 },
16 {
17 type: "agent",
18 content: "an agent message",
19 },
20 {
21 type: "agent",
22 content: "an agent message",
23 },
24 {
25 type: "agent",
26 content: "an agent message",
27 },
28 {
29 type: "user",
30 content: "a user message",
31 },
32 {
33 type: "user",
34 content: "a user message",
35 },
36 ];
37 document.addEventListener("DOMContentLoaded", () => {
Sean McCullough71941bd2025-04-18 13:31:48 -070038 const timelineEl = document.querySelector("sketch-timeline");
Sean McCullough86b56862025-04-18 13:04:03 -070039 timelineEl.messages = messages;
40 });
41 </script>
Sean McCullough86b56862025-04-18 13:04:03 -070042 </head>
43 <body>
44 <h1>sketch-timeline demo</h1>
45
46 <sketch-timeline></sketch-timeline>
Sean McCullough86b56862025-04-18 13:04:03 -070047 </body>
Sean McCullough71941bd2025-04-18 13:31:48 -070048</html>