dioxus-typst
A Dioxus component for rendering Typst documents as HTML.
Note: Typst's HTML export is experimental. Pin your
typstversion and test output carefully.
Usage
use *;
use Typst;
With Files
Provide images, bibliographies, or other files via CompileOptions:
use ;
let options = new
.with_file
.with_file;
rsx!
Custom Class
The component wraps output in <div class="typst-content"> by default:
rsx!
With Packages
let options = new
.with_package;
rsx!
Styling
Typst outputs semantic HTML without CSS. Style with your own:
}
}
}
}
Feature Flags
| Feature | Default | Description |
|---|---|---|
download-packages |
✕ | Automatically download missing Typst packages |
Limitations
- Typst HTML export is experimental and may change
- No automatic CSS generation from Typst styles
- External files must be provided via
CompileOptions