Evan Almloff 3eab363e51 Add authors to all crates vor 1 Jahr
..
PWA-example 3eab363e51 Add authors to all crates vor 1 Jahr
assets c113d96bbe fix: Update logos and custom assets example (#960) vor 2 Jahren
mobile_demo 10a3b228f6 Add some logging and debug vor 2 Jahren
tailwind df23c3c651 Update more docs vor 1 Jahr
README.md 2b47602c27 Update README.md vor 2 Jahren
all_css.rs b182a6ee75 chore: clean up interpreter and bindings vor 2 Jahren
all_events.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
borrowed.rs b182a6ee75 chore: clean up interpreter and bindings vor 2 Jahren
button.rs 14a1039808 make clippy happy vor 2 Jahren
calculator.rs b6c7d44a27 fix clippy vor 2 Jahren
callback.rs b6c7d44a27 fix clippy vor 2 Jahren
clock.rs b6c7d44a27 fix clippy vor 2 Jahren
compose.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI vor 2 Jahren
control_focus.rs 19436e210f Merge branch 'upstream' into query-system vor 2 Jahren
counter.rs 9571adea30 add counter example vor 2 Jahren
crm.rs 5f0dd3af3e it almost lives? vor 1 Jahr
custom_assets.rs c113d96bbe fix: Update logos and custom assets example (#960) vor 2 Jahren
custom_html.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
disabled.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
dog_app.rs e751f63030 Dont use suspense in dog app, remove from use_future vor 1 Jahr
drops.rs c6d4398e36 make clippy happy vor 2 Jahren
error_handle.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
eval.rs 6210c6fefe Convert use_eval to use send/recv system (#1080) vor 1 Jahr
fermi.rs 535435a4cf Fix the issue of duplicate unique ID for atoms using `newtype`. vor 2 Jahren
file_explorer.rs b6c7d44a27 fix clippy vor 2 Jahren
file_upload.rs e39d8708fa Changed `directory` to `webkitdirectory` in `bool_attrs` definitions. vor 1 Jahr
filedragdrop.rs b6c7d44a27 fix clippy vor 2 Jahren
flat_router.rs 5f0dd3af3e it almost lives? vor 1 Jahr
form.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
framework_benchmark.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
generic_component.rs 425d8c64dd use the generic parameter in the generic component example vor 2 Jahren
heavy_compute.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
hello_world.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
hydration.rs d637ef187c fix all broken examples (#1248) vor 1 Jahr
inlineprops.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
inputs.rs ca0e1fb9ab added select element example vor 2 Jahren
link.rs 5f0dd3af3e it almost lives? vor 1 Jahr
login_form.rs 0dad91bc08 wip: pass more events vor 2 Jahren
multiwindow.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI vor 2 Jahren
nested_listeners.rs c8f88b6428 Fix typo (#702) vor 2 Jahren
optional_props.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
overlay.rs c4a18bc24d chore: clean up some clippy warnings and add clippy lints to CI vor 2 Jahren
pattern_model.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
pattern_reducer.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
read_size.rs e7a9161066 fix link component vor 1 Jahr
readme.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
router.rs cfd62e274e Make deprecated use router (#1260) vor 1 Jahr
rsx_compile_fail.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
rsx_usage.rs b6c7d44a27 fix clippy vor 2 Jahren
scroll_to_top.rs a551c0fcb8 add examples for onmounted vor 2 Jahren
shared_state.rs d583e1c750 Fix clippy vor 1 Jahr
shortcut.rs 6512c153dd Fix merge errors vor 2 Jahren
signals.rs 2d8841cf70 Add lazy contexts to signals vor 1 Jahr
simple_desktop.rs 5f0dd3af3e it almost lives? vor 1 Jahr
simple_list.rs 6c677e64da chore: make for loops not the same vor 2 Jahren
simple_router.rs 30f8218251 Add simpler router vor 1 Jahr
ssr.rs b6c7d44a27 fix clippy vor 2 Jahren
suspense.rs d637ef187c fix all broken examples (#1248) vor 1 Jahr
svg.rs b4af761038 fix rng in svg dice example (#970) vor 2 Jahren
svg_basic.rs d160f38bc2 fix: parsing of attributes without trailing commas vor 2 Jahren
tasks.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
textarea.rs b6c7d44a27 fix clippy vor 2 Jahren
todomvc.rs 3aa7349db7 Add more features to todomvc (#928) vor 2 Jahren
web_component.rs 03413a68ab fix formatting vor 2 Jahren
window_event.rs c8f88b6428 Fix typo (#702) vor 2 Jahren
window_focus.rs 44025db5b0 add to example vor 2 Jahren
window_zoom.rs 972084ee32 chore: clean up zoom example vor 2 Jahren
xss_safety.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren

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