Jon Kelley 28fba42e7e feat: add an unhygenic render macro (#556) vor 2 Jahren
..
assets 430cde7068 feat: default asset server vor 3 Jahren
README.md 69dd699b99 Remove outdated example; Add note on performance benchmark vor 3 Jahren
all_css.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
all_events.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
borrowed.rs d734dc5b46 Remove argument from `use_hook` closure (#496) vor 3 Jahren
calculator.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
crm.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
custom_assets.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
custom_element.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
custom_html.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
disabled.rs 41b450eedf chore: remove unnecessary brackets from examples (#552) vor 2 Jahren
dog_app.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
error_handle.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
eval.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
fermi.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
file_explorer.rs 28fba42e7e feat: add an unhygenic render macro (#556) vor 2 Jahren
filedragdrop.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
flat_router.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
form.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
framework_benchmark.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 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 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
inlineprops.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
inputs.rs 41b450eedf chore: remove unnecessary brackets from examples (#552) vor 2 Jahren
link.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
login_form.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
nested_listeners.rs 41b450eedf chore: remove unnecessary brackets from examples (#552) vor 2 Jahren
optional_props.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
pattern_model.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
pattern_reducer.rs 41b450eedf chore: remove unnecessary brackets from examples (#552) vor 2 Jahren
readme.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
router.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
rsx_compile_fail.rs 41b450eedf chore: remove unnecessary brackets from examples (#552) vor 2 Jahren
rsx_usage.rs 41b450eedf chore: remove unnecessary brackets from examples (#552) vor 2 Jahren
simple_list.rs 67dc6e6017 feat: implement type magic to allow strings, format args, and other types directly in rsx (#550) vor 2 Jahren
ssr.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
suspense.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
svg.rs 28fba42e7e feat: add an unhygenic render macro (#556) vor 2 Jahren
svg_basic.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
tailwind.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
tasks.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
textarea.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
todomvc.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
window_event.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
window_zoom.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
xss_safety.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 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_element - Render webcomponents

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

Terminal UI

tui_border

tui_buttons

tui_color_test

tui_components

tui_frame

tui_hover

tui_keys

tui_list

tui_margin

tui_quadrants

tui_readme

tui_task

tui_text

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