Jonathan Kelley 16763c065b Rename dioxus to dx in examples and fullstack hai 1 ano
..
PWA-example 16763c065b Rename dioxus to dx in examples and fullstack hai 1 ano
assets c113d96bbe fix: Update logos and custom assets example (#960) %!s(int64=2) %!d(string=hai) anos
mobile_demo 10a3b228f6 Add some logging and debug %!s(int64=2) %!d(string=hai) anos
tailwind 0029fed24a create complete tailwind example project with steps to setup tailwind %!s(int64=2) %!d(string=hai) anos
README.md 2b47602c27 Update README.md %!s(int64=2) %!d(string=hai) anos
all_css.rs b182a6ee75 chore: clean up interpreter and bindings %!s(int64=2) %!d(string=hai) anos
all_events.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
borrowed.rs b182a6ee75 chore: clean up interpreter and bindings %!s(int64=2) %!d(string=hai) anos
button.rs 14a1039808 make clippy happy %!s(int64=2) %!d(string=hai) anos
calculator.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
callback.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
clock.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
compose.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI %!s(int64=2) %!d(string=hai) anos
control_focus.rs 19436e210f Merge branch 'upstream' into query-system %!s(int64=2) %!d(string=hai) anos
counter.rs 9571adea30 add counter example %!s(int64=2) %!d(string=hai) anos
crm.rs 4d73ffa361 fix: save listeners, borrowed props, and pull back props %!s(int64=2) %!d(string=hai) anos
custom_assets.rs c113d96bbe fix: Update logos and custom assets example (#960) %!s(int64=2) %!d(string=hai) anos
custom_html.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) %!s(int64=2) %!d(string=hai) anos
disabled.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
dog_app.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
drops.rs c6d4398e36 make clippy happy %!s(int64=2) %!d(string=hai) anos
error_handle.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
eval.rs 6dfe84834d fix eval example %!s(int64=2) %!d(string=hai) anos
fermi.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI %!s(int64=2) %!d(string=hai) anos
file_explorer.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
file_upload.rs 22cfff647c Merge branch 'master' into implement-file-engine %!s(int64=2) %!d(string=hai) anos
filedragdrop.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
flat_router.rs e0390ff608 fix: advance dynamic root %!s(int64=2) %!d(string=hai) anos
form.rs d9546d9504 Renderers are now packages, not features. (#387) %!s(int64=3) %!d(string=hai) anos
framework_benchmark.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
generic_component.rs 425d8c64dd use the generic parameter in the generic component example %!s(int64=2) %!d(string=hai) anos
heavy_compute.rs d9546d9504 Renderers are now packages, not features. (#387) %!s(int64=3) %!d(string=hai) anos
hello_world.rs d9546d9504 Renderers are now packages, not features. (#387) %!s(int64=3) %!d(string=hai) anos
hydration.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
inlineprops.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
inputs.rs ca0e1fb9ab added select element example %!s(int64=2) %!d(string=hai) anos
link.rs d9546d9504 Renderers are now packages, not features. (#387) %!s(int64=3) %!d(string=hai) anos
login_form.rs 0dad91bc08 wip: pass more events %!s(int64=2) %!d(string=hai) anos
multiwindow.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI %!s(int64=2) %!d(string=hai) anos
nested_listeners.rs c8f88b6428 Fix typo (#702) %!s(int64=2) %!d(string=hai) anos
optional_props.rs d9546d9504 Renderers are now packages, not features. (#387) %!s(int64=3) %!d(string=hai) anos
overlay.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI %!s(int64=2) %!d(string=hai) anos
pattern_model.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
pattern_reducer.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
read_size.rs c4027c2618 fix clippy %!s(int64=2) %!d(string=hai) anos
readme.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
router.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
rsx_compile_fail.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
rsx_usage.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
scroll_to_top.rs a551c0fcb8 add examples for onmounted %!s(int64=2) %!d(string=hai) anos
shortcut.rs 6512c153dd Fix merge errors %!s(int64=2) %!d(string=hai) anos
signals.rs 2d8841cf70 Add lazy contexts to signals hai 1 ano
simple_desktop.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI %!s(int64=2) %!d(string=hai) anos
simple_list.rs 6c677e64da chore: make for loops not the same %!s(int64=2) %!d(string=hai) anos
ssr.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
suspense.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
svg.rs b4af761038 fix rng in svg dice example (#970) %!s(int64=2) %!d(string=hai) anos
svg_basic.rs d160f38bc2 fix: parsing of attributes without trailing commas %!s(int64=2) %!d(string=hai) anos
tasks.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
textarea.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
todomvc.rs 3aa7349db7 Add more features to todomvc (#928) %!s(int64=2) %!d(string=hai) anos
web_component.rs 03413a68ab fix formatting %!s(int64=2) %!d(string=hai) anos
window_event.rs c8f88b6428 Fix typo (#702) %!s(int64=2) %!d(string=hai) anos
window_focus.rs 44025db5b0 add to example %!s(int64=2) %!d(string=hai) anos
window_zoom.rs 972084ee32 chore: clean up zoom example %!s(int64=2) %!d(string=hai) anos
xss_safety.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos

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

borrowed - Borrowed props

inlineprops - Demo of inline_props macro

optional_props - Optional props

CSS

all_css - You can specify any CSS attribute

tailwind - You can use a library for styling

Input Handling

all_events - Basic event handling demo

filedragdrop - Handle dropped files

form - Handle form submission

inputs - Input values

nested_listeners - Nested handlers and bubbling

textarea - Text area input

State Management

fermi - Fermi library for state management

pattern_reducer - The reducer pattern with use_state

rsx_compile_fail

Async

login_form - Login endpoint example

suspense - Render placeholders while data is loading

tasks - Continuously run future

SVG

svg_basic

svg

Performance

framework_benchmark - Renders a huge list

Note: The benchmark should be run in release mode:

cargo run --example framework_benchmark --release

heavy_compute - How to deal with expensive operations

Server-side rendering

ssr - Rendering RSX server-side

hydration - Pre-rendering with hydration

Common Patterns

disabled - Disable buttons conditionally

error_handle - 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

pattern_model - Simple calculator, but using a custom struct as the model

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
  • Spread props
  • Custom elements
  • Component Children: Pass children into child components
  • Render To string: Render a mounted virtualdom to a string
  • Testing and Debugging