Jonathan Kelley c0315e55f4 chore: more signals methods vor 2 Jahren
..
assets 430cde7068 feat: default asset server vor 3 Jahren
README.md f89cd20455 fix tui example links (#607) 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 5a70c6ecf9 chore: swap over router none vor 2 Jahren
calculator.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
callback.rs 1b14b309e9 chore: clean up desktop vor 2 Jahren
clock.rs ba20bc08b8 chore: clean up clock vor 2 Jahren
compose.rs 22e71a71bd feat: return window vor 2 Jahren
crm.rs 4d73ffa361 fix: save listeners, borrowed props, and pull back props vor 2 Jahren
custom_assets.rs 341ccf6de6 fix: properly canonicalize assets vor 2 Jahren
custom_element.rs d4b6bb8a7b feat: fix the scope rollover bug 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 7e6cea3a13 wip: continue to tweak suspense vor 2 Jahren
error_handle.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
eval.rs 6dfe84834d fix eval example vor 2 Jahren
fermi.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
file_explorer.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
filedragdrop.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
flat_router.rs e0390ff608 fix: advance dynamic root vor 2 Jahren
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 30ef225812 feat: event handling on desktop 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 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
inlineprops.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
inputs.rs 30ef225812 feat: event handling on desktop vor 2 Jahren
link.rs d9546d9504 Renderers are now packages, not features. (#387) vor 3 Jahren
login_form.rs 0dad91bc08 wip: pass more events vor 2 Jahren
multiwindow.rs 7e54764652 fix(Examples/Multi-Window): launch the popup content instead of app. 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 d3ab397ad3 chore: add transparency and overlay 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
readme.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
router.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
rsx_compile_fail.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
rsx_usage.rs b254d9e761 chore: remove cross-crate doc comments vor 2 Jahren
signals.rs c0315e55f4 chore: more signals methods vor 2 Jahren
simple_desktop.rs 36a8275540 cargo fmt vor 2 Jahren
simple_list.rs 6c677e64da chore: make for loops not the same vor 2 Jahren
ssr.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
suspense.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
svg.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
svg_basic.rs d160f38bc2 fix: parsing of attributes without trailing commas vor 2 Jahren
tailwind.rs 540e785d8b Less clumsy configuration for desktop and mobile (#553) vor 2 Jahren
tasks.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
textarea.rs 4eefc3f854 chore: rename all &cx to cx, make clipppy happy vor 2 Jahren
todomvc.rs b182a6ee75 chore: clean up interpreter and bindings vor 2 Jahren
window_event.rs c8f88b6428 Fix typo (#702) 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_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_all_events - All of the terminal events

tui_border - Different styles of borders and corners

tui_buttons - A grid of buttons that work demonstrate the focus system

tui_color_test - Grid of colors to demonstrate compatablility with different terminal color rendering modes

tui_colorpicker - A colorpicker

tui_components - Simple component example

tui_flex - Flexbox support

tui_hover - Detect hover and mouse events

tui_list - Renders a list of items

tui_margin - Margins around flexboxes

tui_quadrants - Four quadrants

tui_readme - The readme example

tui_task - Background tasks

tui_text - Simple text 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