Skip to content

Commit 240ecf0

Browse files
authored
Add example to docs of custom element (#186)
* Add example to docs of custom element * incorporate feedback
1 parent 4d1f18a commit 240ecf0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/content/basic-syntax.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,20 @@ Before version 0.18, Maud allowed the curly braces to be omitted. This syntax wa
7979

8080
[#137]: https://github.com/lambda-fairy/maud/pull/137
8181

82+
## Non-standard HTML ("custom") elements
83+
84+
Maud is not restricted to writing well-known HTML elements like `h1`, `p`, `span`, etc. If you want to use [custom elements][custom-elements], you can.
85+
86+
```rust
87+
html! {
88+
blog-post {
89+
title { "My blog" }
90+
}
91+
}
92+
```
93+
94+
[custom-elements]: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements
95+
8296
## Non-empty attributes `id="yay"`
8397

8498
```rust

0 commit comments

Comments
 (0)