|
2 years ago | |
---|---|---|
.. | ||
PWA-example | 2 years ago | |
assets | 2 years ago | |
mobile_demo | 2 years ago | |
tailwind | 2 years ago | |
README.md | 2 years ago | |
all_css.rs | 2 years ago | |
all_events.rs | 2 years ago | |
borrowed.rs | 2 years ago | |
button.rs | 2 years ago | |
calculator.rs | 2 years ago | |
callback.rs | 2 years ago | |
clock.rs | 2 years ago | |
compose.rs | 2 years ago | |
control_focus.rs | 2 years ago | |
counter.rs | 2 years ago | |
crm.rs | 2 years ago | |
custom_assets.rs | 2 years ago | |
custom_html.rs | 2 years ago | |
disabled.rs | 2 years ago | |
dog_app.rs | 2 years ago | |
drops.rs | 2 years ago | |
error_handle.rs | 2 years ago | |
eval.rs | 2 years ago | |
fermi.rs | 2 years ago | |
file_explorer.rs | 2 years ago | |
file_upload.rs | 2 years ago | |
filedragdrop.rs | 2 years ago | |
flat_router.rs | 2 years ago | |
form.rs | 3 years ago | |
framework_benchmark.rs | 2 years ago | |
generic_component.rs | 2 years ago | |
heavy_compute.rs | 3 years ago | |
hello_world.rs | 3 years ago | |
hydration.rs | 2 years ago | |
inlineprops.rs | 2 years ago | |
inputs.rs | 2 years ago | |
link.rs | 3 years ago | |
login_form.rs | 2 years ago | |
multiwindow.rs | 2 years ago | |
nested_listeners.rs | 2 years ago | |
optional_props.rs | 3 years ago | |
overlay.rs | 2 years ago | |
pattern_model.rs | 2 years ago | |
pattern_reducer.rs | 2 years ago | |
read_size.rs | 2 years ago | |
readme.rs | 2 years ago | |
router.rs | 2 years ago | |
rsx_compile_fail.rs | 2 years ago | |
rsx_usage.rs | 2 years ago | |
scroll_to_top.rs | 2 years ago | |
shortcut.rs | 2 years ago | |
signals.rs | 2 years ago | |
simple_desktop.rs | 2 years ago | |
simple_list.rs | 2 years ago | |
ssr.rs | 2 years ago | |
suspense.rs | 2 years ago | |
svg.rs | 2 years ago | |
svg_basic.rs | 2 years ago | |
tasks.rs | 2 years ago | |
textarea.rs | 2 years ago | |
todomvc.rs | 2 years ago | |
web_component.rs | 2 years ago | |
window_event.rs | 2 years ago | |
window_focus.rs | 2 years ago | |
window_zoom.rs | 2 years ago | |
xss_safety.rs | 2 years ago |
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
borrowed - Borrowed props
inlineprops - Demo of inline_props
macro
optional_props - Optional props
all_css - You can specify any CSS attribute
tailwind - You can use a library for styling
all_events - Basic event handling demo
filedragdrop - Handle dropped files
form - Handle form submission
inputs - Input values
nested_listeners - Nested handlers and bubbling
textarea - Text area input
fermi - Fermi library for state management
pattern_reducer - The reducer pattern with use_state
login_form - Login endpoint example
suspense - Render placeholders while data is loading
tasks - Continuously run future
framework_benchmark - Renders a huge list
Note: The benchmark should be run in release mode:
cargo run --example framework_benchmark --release
heavy_compute - How to deal with expensive operations
ssr - Rendering RSX server-side
hydration - Pre-rendering with hydration
disabled - Disable buttons conditionally
error_handle - 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
pattern_model - Simple calculator, but using a custom struct as the model
crm - Toy multi-page customer management app
dog_app - Accesses dog API
file_explorer - File browser that uses use_ref
to interact with the model
todomvc - Todo task list example
Missing Features
Missing examples