├── .github
├── FUNDING.yml
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_requst.md
├── dependabot.yml
└── workflows
│ └── main.yml
├── .gitignore
├── Cargo.toml
├── README.md
├── docs
└── todomvc
│ ├── index-a7e35c24844438bc.js
│ ├── index-a7e35c24844438bc_bg.wasm
│ └── index.html
├── dog-app
├── .gitignore
├── Cargo.toml
├── README.md
├── dog-app.png
└── src
│ ├── main.rs
│ └── models.rs
├── ecommerce-site
├── .gitignore
├── Cargo.toml
├── README.md
├── demo.png
├── input.css
├── public
│ └── tailwind.css
├── src
│ ├── api.rs
│ ├── components
│ │ ├── cart.rs
│ │ ├── error.rs
│ │ ├── home.rs
│ │ ├── nav.rs
│ │ ├── product_item.rs
│ │ └── product_page.rs
│ └── main.rs
└── tailwind.config.js
├── file-explorer
├── .gitignore
├── Cargo.toml
├── Dioxus.toml
├── README.md
├── assets
│ ├── image.png
│ └── main.css
└── src
│ └── main.rs
├── image_generator_open_ai
├── .gitignore
├── Cargo.toml
└── src
│ └── main.rs
├── ios_demo
├── .gitignore
├── Cargo.toml
├── README.md
├── assets
│ ├── screenshot.jpeg
│ └── screenshot_smaller.jpeg
├── mobile.toml
└── src
│ ├── lib.rs
│ └── style.css
├── jsframework-benchmark
├── .gitignore
├── Cargo.toml
├── index.html
└── src
│ └── main.rs
├── src
└── main.rs
├── todomvc
├── .gitignore
├── Cargo.toml
├── README.md
├── docs
│ ├── index.html
│ └── wasm
│ │ ├── module.js
│ │ └── module_bg.wasm
├── example.png
└── src
│ ├── lib.rs
│ ├── main.rs
│ └── style.css
├── weatherapp
├── .gitignore
├── Cargo.toml
├── README.md
├── src
│ └── main.rs
└── weatherapp.png
└── wifi-scanner
├── .gitignore
├── Cargo.toml
├── README.md
├── demo_small.png
└── src
└── main.rs
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: DioxusLabs # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | open_collective: dioxus-labs # Replace with a single Open Collective username
5 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve Dioxus
4 | ---
5 |
6 | **Problem**
7 |
8 |
9 |
10 | **Steps To Reproduce**
11 |
12 | Steps to reproduce the behavior:
13 |
14 | -
15 | -
16 | -
17 |
18 | **Expected behavior**
19 |
20 | A clear and concise description of what you expected to happen.
21 |
22 | **Screenshots**
23 |
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Environment:**
27 | - Dioxus version: [e.g. v0.17, `master`]
28 | - Rust version: [e.g. 1.43.0, `nightly`]
29 | - OS info: [e.g. MacOS]
30 | - App platform: [e.g. `web`, `desktop`]
31 |
32 | **Questionnaire**
33 |
34 | - [ ] I'm interested in fixing this myself but don't know where to start
35 | - [ ] I would like to fix and I have a solution
36 | - [ ] I don't have time to fix this right now, but maybe later
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_requst.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature Request
3 | about: If you have any interesting advice, you can tell us.
4 | ---
5 |
6 | ## Specific Demand
7 |
8 |
11 |
12 | ## Implement Suggestion
13 |
14 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | # Maintain dependencies for GitHub Actions
4 | - package-ecosystem: "github-actions"
5 | directory: "/"
6 | schedule:
7 | interval: "weekly"
8 |
--------------------------------------------------------------------------------
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | name: Rust CI
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | paths:
8 | - /*
9 | - .github/**
10 | - lib.rs
11 | - Cargo.toml
12 |
13 | pull_request:
14 | types: [opened, synchronize, reopened, ready_for_review]
15 | branches:
16 | - master
17 | paths:
18 | - packages/**
19 | - examples/**
20 | - src/**
21 | - .github/**
22 | - lib.rs
23 | - Cargo.toml
24 |
25 | jobs:
26 | check:
27 | if: github.event.pull_request.draft == false
28 | name: Check
29 | runs-on: ubuntu-latest
30 | steps:
31 | - uses: dtolnay/rust-toolchain@stable
32 | - uses: Swatinem/rust-cache@v2
33 | - run: sudo apt-get update
34 | - run: sudo apt-get install libsoup2.4 javascriptcoregtk-4.0
35 | - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev
36 | - uses: actions/checkout@v4
37 | - run: cargo check --all --examples --tests --exclude dioxus-ios-demo
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | Cargo.lock
3 | dist
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 | members = [
3 | "dog-app",
4 | "ecommerce-site",
5 | "image_generator_open_ai",
6 | "ios_demo",
7 | "jsframework-benchmark",
8 | "todomvc",
9 | "weatherapp",
10 | "wifi-scanner",
11 | ]
12 |
13 | # This is a "virtual package"
14 | # It is not meant to be published, but is used so "cargo run --example XYZ" works properly
15 | [package]
16 | name = "dioxus-example-projects"
17 | version = "0.0.1"
18 | edition = "2021"
19 | description = "Top level crate for the Dioxus examples repository"
20 | authors = ["Jonathan Kelley"]
21 | license = "MIT OR Apache-2.0"
22 | repository = "https://github.com/DioxusLabs/dioxus/"
23 | homepage = "https://dioxuslabs.com"
24 | documentation = "https://dioxuslabs.com"
25 | keywords = ["dom", "ui", "gui", "react", "wasm"]
26 | rust-version = "1.60.0"
27 | publish = false
28 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # **These examples have moved to the main dioxus repo. You can view updated versions [here](https://github.com/DioxusLabs/dioxus/tree/main/examples)**
2 |
3 | # Example projects with Dioxus
4 |
5 | This repository holds the code for a variety of example projects built with Dioxus.
6 |
7 | Each project has information on how to build/deploy.
8 |
9 | If you want to add your own, feel free to make a PR!
10 |
11 |
12 | Current Projects:
13 |
14 |
15 | | Example | Platform | Creator |
16 | | -------------------------------- | ------------ | ----------- |
17 | | [TodoMVC](./todomvc) | Web, Desktop | @jkelleyrtp |
18 | | [TodoMVC](./ios_demo) | iOS | @jkelleyrtp |
19 | | [File Explorer](./file-explorer) | Desktop | @jkelleyrtp |
20 | | [E-Commerce](./ecommerce-site) | LiveView | @jkelleyrtp |
21 | | [WiFi Scanner](./wifi-scanner) | Desktop | @jkelleyrtp |
22 | | [Weather App](./weatherapp) | Web | @jkelleyrtp |
23 | | [Dog App](./dog-app) | Desktop | @jkelleyrtp |
24 |
25 | ## TODOMVC (Desktop, Web)
26 |
27 | [](./todomvc)
28 |
29 | ## iOS TODOMVC
30 | [](./ios_demo)
31 |
32 | ## File Explorer (Desktop)
33 | [](./file-explorer)
34 |
35 |
36 | ## E-Commerce (Liveview)
37 | [](./ecommerce-site)
38 |
39 |
40 | ## WiFi Scanner (Desktop)
41 | [](./wifi-scanner)
42 |
43 | ## Weather App (Web)
44 | [Instructions](./weatherapp/README.md/#Instructions)
45 |
46 | [](./weatherapp)
47 |
48 | ## Dog App (Desktop)
49 | [Instructions](./dog-app/README.md/#Instructions)
50 |
51 | [](./dog-app)
52 |
--------------------------------------------------------------------------------
/docs/todomvc/index-a7e35c24844438bc_bg.wasm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DioxusLabs/example-projects/db87199d2fcdbdd70cf5b6bed5b156ac35fb1e91/docs/todomvc/index-a7e35c24844438bc_bg.wasm
--------------------------------------------------------------------------------
/docs/todomvc/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/dog-app/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/dog-app/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "dog-app"
3 | version = "0.1.1"
4 | edition = "2021"
5 | description = "Search the Dog CEO API for your favorite doggo"
6 | license = "MIT/Apache-2.0"
7 | repository = "https://github.com/DioxusLabs/dioxus/"
8 | homepage = "https://dioxuslabs.com"
9 | documentation = "https://dioxuslabs.com"
10 | keywords = ["dom", "ui", "gui", "react", "wasm"]
11 |
12 | [dependencies]
13 | dioxus = "0.4.0"
14 | dioxus-desktop = "0.4.0"
15 | reqwest = { version = "0.11.8", features = ["json"] }
16 | serde = { version = "1.0.132", features = ["derive"] }
17 |
18 | [package.metadata.bundle]
19 | name = "Dog Search Engine"
20 | identifier = "com.jon.dogsearch"
21 | version = "1.0.1"
22 | copyright = "Copyright (c) Jane Doe 2016. All rights reserved."
23 | category = "Developer Tool"
24 | short_description = "An example application."
25 | long_description = """
26 | Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
27 | eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
28 | enim ad minim veniam, quis nostrud exercitation ullamco laboris
29 | nisi ut aliquip ex ea commodo consequat.
30 | """
31 | # deb_depends = ["libgl1-mesa-glx", "libsdl2-2.0-0 (>= 2.0.5)"]
32 | # osx_frameworks = ["SDL2"]
33 |
--------------------------------------------------------------------------------
/dog-app/README.md:
--------------------------------------------------------------------------------
1 | # 🐶 Dog App
2 |
3 | 
4 |
5 | ### Instructions
6 |
7 | To start it locally, run:
8 |
9 | ```bash
10 | cargo run
11 | ```
--------------------------------------------------------------------------------
/dog-app/dog-app.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DioxusLabs/example-projects/db87199d2fcdbdd70cf5b6bed5b156ac35fb1e91/dog-app/dog-app.png
--------------------------------------------------------------------------------
/dog-app/src/main.rs:
--------------------------------------------------------------------------------
1 | #![allow(non_snake_case)]
2 |
3 | use dioxus::{html::input_data::keyboard_types::Key, prelude::*};
4 | use dioxus_desktop::{Config, WindowBuilder};
5 |
6 | use crate::models::{list_all_breeds, random_image_by_breed};
7 | mod models;
8 |
9 | fn main() {
10 | dioxus_desktop::launch_cfg(
11 | app,
12 | Config::default().with_window(
13 | WindowBuilder::new()
14 | .with_maximized(true)
15 | .with_title("Dog App"),
16 | ),
17 | )
18 | }
19 |
20 | fn app(cx: Scope) -> Element {
21 | let selected_breed = use_state::