hypra

SEM-001: unknown element

Error: the page doesn't build until this is fixed.

Hypra knows every HTML element, so a name it doesn't know is usually a typo, which a browser would show as an empty, unstyled box. The message suggests the closest name.

Fails

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  buton "Buy"
}
error[SEM-001]: unknown element `buton`
 --> page.hypra:3:3
  |
3 |   buton "Buy"
  |   ^^^^^
  = help: did you mean `button`?
  = docs: https://hypralang.dev/rules/sem-001/

1 error, 0 warnings

Fixed

page(title: "Shoes", description: "All our running shoes, from light racers to trail shoes.") {
  h1 "Shoes"
  button "Buy"
  model-viewer(src: "/models/runner-x.glb", alt: "Runner X in 3D")
}

Custom elements and web components have a dash in their name, like model-viewer, and pass as they are. Components start with a capital letter.