Expand description
A Dioxus component for rendering Typst documents as HTML.
This crate provides a Typst component that compiles Typst markup to HTML
at runtime, allowing you to embed rich typeset content in Dioxus applications.
§Example
ⓘ
use dioxus::prelude::*;
use dioxus_typst::Typst;
#[component]
fn App() -> Element {
let content = r#"
= Hello, Typst!
Some *formatted* text with math: $E = m c^2$
"#;
rsx! {
Typst { source: content.to_string() }
}
}§Feature Flags
download-packages: Enables automatic downloading of Typst packages from the package registry.
§Limitations
Typst’s HTML export is experimental and may change between versions. Pin your
typst dependency and test output carefully when upgrading.
Re-exports§
pub use Typst_completions::Component::Typst;
Structs§
- Compile
Options - Options for configuring Typst compilation.
- Typst
Props - Properties for the
Typstcomponent.
Enums§
- Compile
Error - Errors that can occur during Typst compilation.
Functions§
- Typst
- A Dioxus component that renders Typst markup as HTML.