diff --git a/examples/README.md b/examples/README.md
new file mode 100644
index 0000000..8af8493
--- /dev/null
+++ b/examples/README.md
@@ -0,0 +1,16 @@
+# Flows examples
+
+This directory contains examples of flows that can be used as a starting point for your own Flows implementation.
+
+## Examples
+
+- [React Next.js](./react-nextjs) - A simple example of how to use Flows with React and Next.js.
+- [JavaScript](./javascript) - A simple example of how to use Flows with vanilla JavaScript.
+
+## Reporting Issues
+
+We actively encourage our community to raise issues and provide feedback. If you find an issue, please let us know by raising an issue in the repository.
+
+An issue can be raised by clicking the 'Issues' tab at the top of the repository, followed by the Green 'New issue' button.
+
+When submitting an issue, please thoroughly and concisely describe the problem you are experiencing so that we may easily understand and resolve the issue in a timely manner.
diff --git a/examples/vanilla-js/.gitignore b/examples/javascript/.gitignore
similarity index 100%
rename from examples/vanilla-js/.gitignore
rename to examples/javascript/.gitignore
diff --git a/examples/javascript/arrow.svg b/examples/javascript/arrow.svg
new file mode 100644
index 0000000..91635fb
--- /dev/null
+++ b/examples/javascript/arrow.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/examples/vanilla-js/favicon.ico b/examples/javascript/favicon.ico
similarity index 100%
rename from examples/vanilla-js/favicon.ico
rename to examples/javascript/favicon.ico
diff --git a/examples/javascript/index.html b/examples/javascript/index.html
new file mode 100644
index 0000000..1edb9a0
--- /dev/null
+++ b/examples/javascript/index.html
@@ -0,0 +1,233 @@
+
+
+
+
);
}
diff --git a/examples/react-nextjs/components/flows.tsx b/examples/react-nextjs/components/flows.tsx
index bcae177..f6c0839 100644
--- a/examples/react-nextjs/components/flows.tsx
+++ b/examples/react-nextjs/components/flows.tsx
@@ -11,15 +11,112 @@ export const Flows = () => {
{
id: "local-flow",
clickElement: "#start-local",
+ frequency: "every-time",
steps: [
{
- targetElement: "#start-local",
- title: "Welcome to FlowsJS!",
- body: "This is a demo of FlowsJS. Click the button below to continue.",
+ title: "Welcome to Flows!",
+ body: "This is a demo of a local flow loaded from the codebase. Flows offer cloud flows as well, which can be updated without needing code changes.",
},
{
- title: "This is a modal",
- body: "This is a modal. It is an useful way to show larger amounts of information with detailed descriptions. For smaller amounts of information, you can use a tooltip. Click the button below to continue.",
+ title: "This is a tooltip",
+ body: "It can have an overlay...",
+ targetElement: "#file1",
+ overlay: true,
+ },
+ {
+ title: "...or not",
+ body: "You can customize the tooltip to your liking.",
+ targetElement: "#file1",
+ },
+ {
+ title: "You can also wait for a click",
+ body: "Just like this! Click the button to continue.",
+ targetElement: "#upload",
+ overlay: true,
+ wait: {
+ clickElement: "#upload",
+ },
+ hideNext: true,
+ },
+ {
+ title: "Or you can branch out with forks",
+ body: "Click on one of the files to continue.",
+ targetElement: ".app-files",
+ overlay: true,
+ wait: [
+ {
+ clickElement: "#file1",
+ targetBranch: 0,
+ },
+ {
+ clickElement: "#file2",
+ targetBranch: 1,
+ },
+ {
+ clickElement: "#file3",
+ targetBranch: 2,
+ },
+ {
+ clickElement: "#file4",
+ targetBranch: 3,
+ },
+ ],
+ hideNext: true,
+ },
+ [
+ [
+ {
+ title: "You clicked on file 1",
+ body: "With forks, you can create multiple branches to tailor the onboarding to user actions.",
+ targetElement: "#file1",
+ overlay: true,
+ },
+ ],
+ [
+ {
+ title: "You clicked on file 2",
+ body: "With forks, you can create multiple branches to tailor the onboarding to user actions.",
+ targetElement: "#file2",
+ overlay: true,
+ },
+ ],
+ [
+ {
+ title: "You clicked on file 3",
+ body: "With forks, you can create multiple branches to tailor the onboarding to user actions.",
+ targetElement: "#file3",
+ overlay: true,
+ },
+ ],
+ [
+ {
+ title: "You clicked on file 4",
+ body: "With forks, you can create multiple branches to tailor the onboarding to user actions.",
+ targetElement: "#file4",
+ overlay: true,
+ },
+ ],
+ ],
+ {
+ title: "That was the basics of Flows!",
+ body: "You can create complex onboarding flows with Flows or a simple tour. If you liked what you saw, sign up and start creating your own flows.",
+ hideNext: true,
+ hidePrev: true,
+ footerActions: {
+ center: [
+ {
+ label: "Learn more",
+ external: true,
+ href: "https://flows.sh/docs",
+ variant: "secondary",
+ },
+ {
+ label: "Sign up",
+ external: true,
+ href: "https://app.flows.sh/signup",
+ },
+ ],
+ },
},
],
},
diff --git a/examples/react-nextjs/public/arrow.svg b/examples/react-nextjs/public/arrow.svg
new file mode 100644
index 0000000..91635fb
--- /dev/null
+++ b/examples/react-nextjs/public/arrow.svg
@@ -0,0 +1,5 @@
+
\ No newline at end of file
diff --git a/examples/react-nextjs/public/logo.svg b/examples/react-nextjs/public/logo.svg
new file mode 100644
index 0000000..6f66e11
--- /dev/null
+++ b/examples/react-nextjs/public/logo.svg
@@ -0,0 +1,19 @@
+
\ No newline at end of file
diff --git a/examples/vanilla-js/index.html b/examples/vanilla-js/index.html
deleted file mode 100644
index d0bd7e3..0000000
--- a/examples/vanilla-js/index.html
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
- Flows - Vanilla JS example
-
-
-
-
-
-
-
-
-
-
Flows - Vanilla JS example
-
-
-
-
diff --git a/examples/vanilla-js/index.js b/examples/vanilla-js/index.js
deleted file mode 100644
index 1c1e634..0000000
--- a/examples/vanilla-js/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-window.FlowsJS?.init({
- projectId: "e7d8eb63-7670-4da1-b0e0-d2d3331d108b",
- flows: [
- {
- id: "local-flow",
- clickElement: "#start-local",
- steps: [
- {
- targetElement: "#start-local",
- title: "Welcome to FlowsJS!",
- body: "This is a demo of FlowsJS. Click the button below to continue.",
- },
- {
- title: "This is a modal",
- body: "This is a modal. It is an useful way to show larger amounts of information with detailed descriptions. For smaller amounts of information, you can use a tooltip. Click the button below to continue.",
- },
- ],
- },
- ],
-});