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() }
}
}Re-exports§
pub use Typst_completions::Component::Typst;
Structs§
- Compile
Options - Options for configuring Typst compilation.
- Document
Metadata - Metadata extracted from a Typst document.
- 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.
- extract_
metadata - Compiles Typst source and extracts document metadata.