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