Writing attributes is very straight-forward. Simply put them in parentheses directly behind the element's name. You can assign an attribute any printable expression you want.
Classes and IDs, being incredibly common, even get their own short form.
Corgis are smart doggos! Corgi will combine multiple class attributes and short forms into a single class attribute. This does not work for other attributes.
You can only place the &-operator before you write text or another element to the element's body. If you don't, the compiler will complain:
func Example()button > Click me! &(disabled)
The above won't compile:
error: use of & after writing to element's body
> example.corgi:5:3
|
3 | button
| ~~~~~~ in this element
4 | > Click me!
| ~~~~~~~~~~~ you wrote an arrow block here
5 | &(disabled)
| ^ so you cannot place an & here
suggestion: you can only use the & operator before you write to the body of an element.
The div Shorthand
divs are incredibly common. Therefore, as long as your div has at least one class or an id, you can write .foo or #bar to produce a div.