Jonathan Kelley 28a9dc6805 Pin assets sha to keep CI in check hai 1 ano
..
PWA-example 95887e836c fix: Add the --locked param to every cli installation command (#1427) hai 1 ano
assets c113d96bbe fix: Update logos and custom assets example (#960) %!s(int64=2) %!d(string=hai) anos
mobile_demo 9a6d745339 Refactor desktop into App type hai 1 ano
openid_connect_demo 0e3fd225a8 Merge branch 'master' into binary-protocal hai 1 ano
query_segments_demo 8f70509bc3 Merge pull request #1680 from ealmloff/derive-query-parsing hai 1 ano
tailwind 28a9dc6805 Pin assets sha to keep CI in check hai 1 ano
README.md ee25c03e74 fix some clippy lints hai 1 ano
all_css.rs b182a6ee75 chore: clean up interpreter and bindings %!s(int64=2) %!d(string=hai) anos
all_events.rs 937be8b752 fix the on double click event and depreciate ondblclick (#1743) hai 1 ano
borrowed.rs b182a6ee75 chore: clean up interpreter and bindings %!s(int64=2) %!d(string=hai) anos
calculator.rs bc857bf339 Make clippy happy hai 1 ano
callback.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
clock.rs 2e9737ef57 Clean up and document the protocol handler hai 1 ano
compose.rs a95f4dfe0d fmt hai 1 ano
control_focus.rs 19436e210f Merge branch 'upstream' into query-system %!s(int64=2) %!d(string=hai) anos
counter.rs df222c121a port examples to new events hai 1 ano
crm.rs 0388a5c1f4 fix formatting hai 1 ano
custom_assets.rs 28a9dc6805 Pin assets sha to keep CI in check hai 1 ano
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 c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) hai 1 ano
drops.rs c6d4398e36 make clippy happy %!s(int64=2) %!d(string=hai) anos
dynamic_asset.rs 347351d1ee Finish asset handler hai 1 ano
error_handle.rs 6141aeb037 polish the throw trait hai 1 ano
eval.rs dd4547d753 Feat: add global context functions hai 1 ano
fermi.rs 535435a4cf Fix the issue of duplicate unique ID for atoms using `newtype`. %!s(int64=2) %!d(string=hai) anos
file_explorer.rs 28a9dc6805 Pin assets sha to keep CI in check hai 1 ano
file_upload.rs 9c4d90350f fix merge conflicts for files hai 1 ano
filedragdrop.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
flat_router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) hai 1 ano
form.rs df222c121a port examples to new events hai 1 ano
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 d637ef187c fix all broken examples (#1248) hai 1 ano
inlineprops.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) hai 1 ano
inputs.rs ca0e1fb9ab added select element example %!s(int64=2) %!d(string=hai) anos
link.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) hai 1 ano
login_form.rs dccfba12d8 Merge branch 'master' into events-2 hai 1 ano
multiwindow.rs dd4547d753 Feat: add global context functions hai 1 ano
nested_listeners.rs c8f88b6428 Fix typo (#702) %!s(int64=2) %!d(string=hai) anos
optional_props.rs 533c7bab49 show more cases in the optional props example hai 1 ano
overlay.rs dd4547d753 Feat: add global context functions hai 1 ano
pattern_model.rs bc857bf339 Make clippy happy hai 1 ano
pattern_reducer.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
read_size.rs e7a9161066 fix link component hai 1 ano
readme.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) hai 1 ano
rsx_compile_fail.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy %!s(int64=2) %!d(string=hai) anos
rsx_usage.rs 8df7a7685e Merge branch 'master' into many_optional_attributes hai 1 ano
scroll_to_top.rs a551c0fcb8 add examples for onmounted %!s(int64=2) %!d(string=hai) anos
shared_state.rs 219c068283 Merge branch 'master' into events-2 hai 1 ano
shortcut.rs 6512c153dd Fix merge errors %!s(int64=2) %!d(string=hai) anos
signals.rs 9cdbf81a4b fix clippy lint hai 1 ano
simple_desktop.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) hai 1 ano
simple_list.rs 6c677e64da chore: make for loops not the same %!s(int64=2) %!d(string=hai) anos
simple_router.rs c866ae602b Add system for creating component attributes + new `#[component]` attribute (#1448) hai 1 ano
spread.rs 5b6f9d6b80 fix merge hai 1 ano
ssr.rs b6c7d44a27 fix clippy %!s(int64=2) %!d(string=hai) anos
streams.rs 6ed038e9e5 Add example of working with streams hai 1 ano
suspense.rs d637ef187c fix all broken examples (#1248) hai 1 ano
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 df222c121a port examples to new events hai 1 ano
todomvc.rs 28a9dc6805 Pin assets sha to keep CI in check hai 1 ano
video_stream.rs 2e0cded871 Make clippy happy hai 1 ano
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 bc857bf339 Make clippy happy hai 1 ano
window_zoom.rs dccfba12d8 Merge branch 'master' into events-2 hai 1 ano
xss_safety.rs df222c121a port examples to new events hai 1 ano

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