* Update dependencies in Cargo.lock * added in the missing bevy example which was included in recent merge * undo unneccessary library installation in gh actions * cleaned up further * Update dependencies in Cargo.toml and Cargo.lock askana_escape to 0.13 * updated code to make tests work * updated the wgpu texture example * replaced all direct reference with use * fixed wgpu and jsframework errors in benches and examples * Fix: Import black_box from std::hint * grand finale upgrade * updated cargo.lock * Bump hyper-util to 0.1.15 and plist to 1.7.4 * remove some unused swc dependencies and add a command to update them in the future --------- Co-authored-by: Evan Almloff <evanalmloff@gmail.com> Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
Examples
These examples are fully-fledged mini Dioxus apps.
You can run them with cargo run --example EXAMPLE_NAME. Example:
cargo run --example hello_world
(Most of these examples are run through webview, so you don't need the Dioxus CLI installed)
Basic Features
hello_world - Most basic example
readme - Counter example from the Readme
custom_assets - Include images
custom_html - Customize wrapper HTML
eval - Evaluate JS expressions
RSX
rsx_usage - Demo of all RSX features
xss_safety - You can include text without worrying about injections by default
Props
optional_props - Optional props
CSS
tailwind - You can use a library for styling
Input Handling
all_events - Basic event handling demo
file upload - Handle uploading files
form - Handle form submission
nested_listeners - Nested handlers and bubbling
State Management
context_api - Cross-component state sharing via Context API
counters - Mapping a Signal<Vec<T>> into UI elements
futures - Handle async Rust with use_future, use_effect, and async event handlers
Async
login_form - Login endpoint example
suspense - Render placeholders while data is loading
SVG
Server-side rendering
ssr - Rendering RSX server-side
hydration - Pre-rendering with hydration
Common Patterns
disabled - Disable buttons conditionally
errors - Handle errors with early return
Routing
flat_router - Basic, flat route example
router - Router example
link - Internal, external and custom links
Platform Features
window_event - Window decorations, fullscreen, minimization, etc.
window_zoom – Zoom in or out
popup - Create a popup window and send data back to the main window
Example Apps
calculator - Simple calculator
crm - Toy multi-page customer management app
dog_app - Accesses dog API
todomvc - Todo task list example