Evan Almloff 95976d9a17 Extend head components with global attributes (#2888) 8 месяцев назад
..
assets 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
fullstack-auth 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
fullstack-desktop 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
fullstack-hello-world 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
fullstack-router 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
fullstack-streaming 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
mobile_demo 36f67bd5e2 update 0.4 doc links to 0.5 1 год назад
pwa 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
ssg-github-pages 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
ssg-router 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
ssg-simple 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 месяцев назад
tailwind c4e55c7fb6 Fix #2378: CLI MSRV and add MSRV to CI (#2716) 11 месяцев назад
README.md c2b131f249 File explorer example moved from `examples` to `example-projects`. (#3009) 9 месяцев назад
all_events.rs c6a2e5b6c8 Use head elements and new manganis syntax in examples (#2688) 11 месяцев назад
backgrounded_futures.rs 1dfa1b5e7f Use of `async_std::task::sleep` instead of `tokio::time::sleep` in examples (#2912) 9 месяцев назад
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 14a8902374 Use of async_std::task::sleep instead of tokio::time::sleep (#2939) 9 месяцев назад
control_focus.rs 1dfa1b5e7f Use of `async_std::task::sleep` instead of `tokio::time::sleep` in examples (#2912) 9 месяцев назад
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 c7124e41fb Add space between rsx and exclamation point (#2956) 9 месяцев назад
eval.rs 1dfa1b5e7f Use of `async_std::task::sleep` instead of `tokio::time::sleep` in examples (#2912) 9 месяцев назад
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 1dfa1b5e7f Use of `async_std::task::sleep` instead of `tokio::time::sleep` in examples (#2912) 9 месяцев назад
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 76ad23c822 chore: add the missing in comment (#2978) 9 месяцев назад
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 1dfa1b5e7f Use of `async_std::task::sleep` instead of `tokio::time::sleep` in examples (#2912) 9 месяцев назад
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 95976d9a17 Extend head components with global attributes (#2888) 8 месяцев назад
ssr.rs cfc119cce2 Update more examples, add css for more examples 1 год назад
streams.rs 1dfa1b5e7f Use of `async_std::task::sleep` instead of `tokio::time::sleep` in examples (#2912) 9 месяцев назад
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 2733497038 Simplify TodoMVC example (#2935) 9 месяцев назад
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

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