Evan Almloff b47a6cf83e Move to a generic GlobalLazy<T> (#2851) пре 10 месеци
..
PWA-example 8636ada3a4 Add a deprecation warning for the resource option in dioxus.toml (#2642) пре 11 месеци
assets c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
mobile_demo 36f67bd5e2 update 0.4 doc links to 0.5 пре 1 година
openid_connect_demo 8636ada3a4 Add a deprecation warning for the resource option in dioxus.toml (#2642) пре 11 месеци
tailwind c4e55c7fb6 Fix #2378: CLI MSRV and add MSRV to CI (#2716) пре 11 месеци
README.md 022e4ad203 Suspense boundaries/out of order streaming/anyhow like error handling (#2365) пре 1 година
all_events.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
backgrounded_futures.rs bdbae8ccb0 Update examples, add css пре 1 година
calculator.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
calculator_mutable.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
clock.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
control_focus.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
counters.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
crm.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
custom_assets.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
custom_html.rs 86d1dba699 Check type of launch config (#2125) пре 1 година
custom_menu.rs 72ef58b95e Create use_muda_event_handler hook (#2367) пре 1 година
disabled.rs bdbae8ccb0 Update examples, add css пре 1 година
dog_app.rs 672f4dfefc Re-Export Manganis & Update Examples (#2625) пре 11 месеци
dynamic_asset.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
errors.rs 022e4ad203 Suspense boundaries/out of order streaming/anyhow like error handling (#2365) пре 1 година
eval.rs ffe02b43c5 fix: typo (#2202) пре 1 година
file_explorer.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
file_upload.rs cab573eefd Synchronous prevent default (#2792) пре 10 месеци
flat_router.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
form.rs 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653) пре 11 месеци
future.rs 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653) пре 11 месеци
generic_component.rs b3cd4fac10 set up example scaping for docs.rs (#2450) пре 1 година
global.rs b47a6cf83e Move to a generic GlobalLazy<T> (#2851) пре 10 месеци
hash_fragment_state.rs 08da9a1253 Implement hash fragments in the router (#2320) пре 1 година
hello_world.rs bdbae8ccb0 Update examples, add css пре 1 година
hydration.rs 85c7c22619 Make router work on web пре 1 година
image_generator_openai.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
link.rs cab573eefd Synchronous prevent default (#2792) пре 10 месеци
login_form.rs b3cd4fac10 set up example scaping for docs.rs (#2450) пре 1 година
memo_chain.rs b3cd4fac10 set up example scaping for docs.rs (#2450) пре 1 година
meta.rs 176e67e5b7 switch to a Document trait and introduce Script/Head/Style/Meta components (#2635) пре 11 месеци
multiwindow.rs 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653) пре 11 месеци
nested_listeners.rs a5b4ceed39 chore: fix some typos in comments (#2340) пре 1 година
optional_props.rs 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653) пре 11 месеци
overlay.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
popup.rs bdbae8ccb0 Update examples, add css пре 1 година
query_segment_search.rs 08da9a1253 Implement hash fragments in the router (#2320) пре 1 година
read_size.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
readme.rs 3a21ac5710 remove repetitive words (#2046) пре 1 година
reducer.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
resize.rs 2f49a89638 Add the `onresize` event handler to Element (#2479) пре 10 месеци
router.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
router_resource.rs c094bf3ec3 fix header docs in router_resource пре 1 година
rsx_usage.rs 1a66987245 Fix: enable dangerous_inner_html for svgs (#2717) пре 11 месеци
scroll_to_top.rs b3cd4fac10 set up example scaping for docs.rs (#2450) пре 1 година
shortcut.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
shorthand.rs 022e4ad203 Suspense boundaries/out of order streaming/anyhow like error handling (#2365) пре 1 година
signals.rs 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653) пре 11 месеци
simple_list.rs b30810e486 cut out a number of changes from the hr PR (#2580) пре 1 година
simple_router.rs 44e997f7df Fix eventhandler optional (#2119) пре 1 година
spread.rs 9c64fc4769 Fix #1938, allow explicit props пре 1 година
ssr.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
streams.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
suspense.rs 022e4ad203 Suspense boundaries/out of order streaming/anyhow like error handling (#2365) пре 1 година
svg.rs cab573eefd Synchronous prevent default (#2792) пре 10 месеци
title.rs 176e67e5b7 switch to a Document trait and introduce Script/Head/Style/Meta components (#2635) пре 11 месеци
todomvc.rs cab573eefd Synchronous prevent default (#2792) пре 10 месеци
video_stream.rs cfc119cce2 Update more examples, add css for more examples пре 1 година
weather_app.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
web_component.rs 9167cd9dec fix most typos, add crate-ci/typos to CI (#2653) пре 11 месеци
window_event.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) пре 11 месеци
window_focus.rs 4bb807a3ce Reduce churn in window behavior пре 1 година
window_zoom.rs 2e8af5fc62 fix clippy on zoom example пре 11 месеци
xss_safety.rs bb5ecd779f clean up some examples, ensuring stuff works пре 1 година

README.md

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

inputs - Input values

nested_listeners - Nested handlers and bubbling

textarea - Text area input

State Management

Async

login_form - Login endpoint example

suspense - Render placeholders while data is loading

tasks - Continuously run future

SVG

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

Example Apps

calculator - Simple calculator

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

TODO

Missing Features

  • Fine-grained reactivity
  • Refs - imperative handles to elements
  • Function-driven children: Pass functions to make VNodes

Missing examples

  • Shared state
  • Root-less element groups
  • Custom elements
  • Component Children: Pass children into child components
  • Render To string: Render a mounted virtualdom to a string
  • Testing and Debugging