Playground
Pick a scene and press Run. Each line lights up while it plays in the video.
1export default {
2 async run({ card, open, click, see }) {
3 await card("How to", "set a swell alert.");
4 await open("/");
5 await click("Malibu Point");
6 await click("Set alert");
7 await see("Alert set");
8 await card("Done:", "you will know when it is good.");
9 },
10};
1export default {
2 format: "tutorial",
3 async run({ background, card, open,
4 select, click, see }) {
5 await background("#0b3350");
6 await card("How to", "find this weekend's waves.");
7 await open("/");
8 await select("Day", "Saturday", {
9 say: "Open Day and choose Saturday." });
10 await click("Biggest first", {
11 say: "Biggest first puts the largest swell on top." });
12 await see("Sorted by swell height");
13 await background("assets/night.jpg");
14 await card("That is it:", "two steps.");
15 },
16};
1export default {
2 format: "demo",
3 async run({ background, card, open, animate,
4 select, click, zoom, see, overlay }) {
5 await background("assets/night.jpg");
6 await card("Tidepool", "knows when it is good.");
7 await open("/forecast");
8 await animate({ testid: "swell" }, "count", {
9 say: "The best swell this week is on Saturday." });
10 await animate({ selector: "#chart" }, "draw");
11 await card("But where", "is it good right now?");
12 await background("#0b3350");
13 await open("/");
14 await select("Region", "California", {
15 say: "One filter shows your coast." });
16 await click("Malibu Point");
17 await zoom({ selector: "#panel dl" }, {
18 say: "Offshore wind and a rising tide." });
19 await click("Set alert", { sound: "success" });
20 await see("Alert set");
21 await overlay("component:phone", {
22 say: "And your phone tells you when to go.",
23 data: { app: "Tidepool", initial: "T",
24 title: "Swell alert",
25 body: "Malibu Point is 2.4 m. Go now." } });
26 await card("Never miss", "a good morning.");
27 },
28};
Press Run to see what this scene makes