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)
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_usage - Demo of all RSX features
xss_safety - You can include text without worrying about injections by default
optional_props - Optional props
tailwind - You can use a library for styling
all_events - Basic event handling demo
file upload - Handle uploading files
form - Handle form submission
inputs - Input values
nested_listeners - Nested handlers and bubbling
textarea - Text area input
context_api - Cross-component state sharing via Context API
login_form - Login endpoint example
suspense - Render placeholders while data is loading
tasks - Continuously run future
ssr - Rendering RSX server-side
hydration - Pre-rendering with hydration
disabled - Disable buttons conditionally
errors - Handle errors with early return
flat_router - Basic, flat route example
router - Router example
link - Internal, external and custom links
window_event - Window decorations, fullscreen, minimization, etc.
window_zoom – Zoom in or out
calculator - Simple calculator
crm - Toy multi-page customer management app
dog_app - Accesses dog API
todomvc - Todo task list example