Evan Almloff 20d146d9bd Simplify the launch builder (#2967) 8 月之前
..
assets 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 月之前
fullstack-auth 983fcfc616 Chore: hoist example projects for discoverability (#2959) 9 月之前
fullstack-desktop 20d146d9bd Simplify the launch builder (#2967) 8 月之前
fullstack-hello-world 20d146d9bd Simplify the launch builder (#2967) 8 月之前
fullstack-router 20d146d9bd Simplify the launch builder (#2967) 8 月之前
fullstack-streaming 20d146d9bd Simplify the launch builder (#2967) 8 月之前
mobile_demo 20d146d9bd Simplify the launch builder (#2967) 8 月之前
pwa 20d146d9bd Simplify the launch builder (#2967) 8 月之前
ssg-github-pages 20d146d9bd Simplify the launch builder (#2967) 8 月之前
ssg-router 20d146d9bd Simplify the launch builder (#2967) 8 月之前
ssg-simple 20d146d9bd Simplify the launch builder (#2967) 8 月之前
tailwind 20d146d9bd Simplify the launch builder (#2967) 8 月之前
README.md c2b131f249 File explorer example moved from `examples` to `example-projects`. (#3009) 9 月之前
all_events.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
backgrounded_futures.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
calculator.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
calculator_mutable.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
clock.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
control_focus.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
counters.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
crm.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
custom_assets.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
custom_html.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
custom_menu.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
disabled.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
dog_app.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
dynamic_asset.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
errors.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
eval.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
file_upload.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
flat_router.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
form.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
future.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
generic_component.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
global.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
hash_fragment_state.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
hello_world.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
hydration.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
image_generator_openai.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
link.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
login_form.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
memo_chain.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
meta.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
multiwindow.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
nested_listeners.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
optional_props.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
overlay.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
popup.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
query_segment_search.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
read_size.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
readme.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
reducer.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
resize.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
router.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
router_resource.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
rsx_usage.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
scroll_to_top.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
shortcut.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
shorthand.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
signals.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
simple_list.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
simple_router.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
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 20d146d9bd Simplify the launch builder (#2967) 8 月之前
suspense.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
svg.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
title.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
todomvc.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
video_stream.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
weather_app.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
web_component.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
window_event.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
window_focus.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
window_zoom.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前
xss_safety.rs 20d146d9bd Simplify the launch builder (#2967) 8 月之前

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