update the dioxus cratesio readme, add many more examples (#5501)

* update the dioxus cratesio readme

* fix example

* fix header

* add a bunch more examples
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2026-04-21 17:07:48 -07:00
1 parent 74e7d20f80
commit cd54f5953b
30 files changed
+1403 -235

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
//! Setting a favicon.
//!
//! Use `document::Link` with `rel: "icon"` to point the browser at a favicon. Combined with
//! `asset!`, the favicon is bundled into the app and served with the same path-mangling
//! and cache-busting as any other asset.
use dioxus::prelude::*;
const FAVICON: Asset = asset!("/examples/assets/logo.png");
fn main() {
dioxus::launch(app);
}
fn app() -> Element {
rsx! {
// Link is a generic head element — for a favicon set rel="icon"
document::Link { rel: "icon", href: FAVICON }
h1 { "Check the browser tab!" }
p { "The favicon is loaded from examples/assets/logo.png." }
}
}