Code
Typography
Inline code, or a code block with block; language: colours it.
Code(content, block: …, language: …)
Example
Text("Run ")
Code("wf serve")
Code("page Home(path: \"/\") { Text(\"Hi\") }", language: "wf").block
Renders with the class wf-code, stable across releases, so a stylesheet may target it.
| Prop | Type | Meaning |
|---|---|---|
| content | Any (positional) |
The code |
| block: | Bool |
A multi-line block |
| language: | String |
Colours the code as this language: |
Attribute families: global, aria, data. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.