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