about summary refs log tree commit diff stats
path: root/html/attributes.go
Commit message (Collapse)AuthorAgeLines
* Rename and document fork v1.2.0Alan Pearce33 hours-2/+2
|
* Add `Scope` attribute (#249)Alan Pearce35 hours-0/+4
| | | https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#scope
* Add 'download' and 'referrerpolicy' attributes for anchor <a> element (#242)Stéphane Legrand2025-02-06-0/+8
| | | | | | | | | Hello, A patch to add [`download`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#download) and [`referrerpolicy`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#referrerpolicy) for the anchor `<a>` element.
* Add formxxx attributes (for <input type="submit"> element) (#241)Stéphane Legrand2025-02-03-0/+20
| | | | | | | | | | | | | | Hello, A small patch to add the following attributes: - formaction - formenctype - formmethod - formnovalidate - formtarget These attributes are useful in `<input type="submit">` element: [MDN documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/submit#additional_attributes)
* Add popover attributes (#236)Ken Powers2024-10-30-0/+12
| | | | | | | | This PR adds popover attributes as detailed here: https://developer.mozilla.org/en-US/docs/Web/API/Popover_API/Using --------- Co-authored-by: Markus Wüstenberg <markus@maragu.dk>
* Add web component elements and slot attribute (#235)Ken Powers2024-10-25-0/+4
| | | | The slot attribute is a standard attribute for use with web components: https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots
* Add missing 'hidden' attribute (#224)Guy-Laurent Subri2024-10-10-0/+4
|
* Move module to maragu.dev/gomponents namespace (#215)Markus Wüstenberg2024-10-03-1/+1
| | | | | | | | | | This is a breaking change to move gomponents to my own import namespace. I will obviously be careful with this, test it out in all kinds of scenarios, release betas, etc. But otherwise, because the `Node` interface is so simple and has basically never changed, I don't think this will break much. 🤞 Fixes #200
* Reduce code duplication by reusing the correct function in deprecated ↵Yarden Shoham2024-08-20-3/+3
| | | | functions (#194)
* Add `cite` attribute (#192)Yarden Shoham2024-08-19-0/+4
| | | | | | | It can appear in a `<blockquote>`. - Closes https://github.com/maragudk/gomponents/issues/189 Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Add draggable attribute (#185)Leonardo Silveira2024-07-08-0/+4
|
* Add datetime attribute (#177)Julien Tant2024-06-21-0/+4
| | | | | `<time>`, `<del>` and `<ins>` can receive a [`datetime`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement/dateTime) attribute
* Add dir (#176)Amr Ojjeh2024-06-19-0/+4
| | | | | | | `dir` is a global attribute that lets you specify whether text is RTL or LTR or if it should be determined by the browser. Documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir
* Add LabelAttr and List attributes (#175)Markus Wüstenberg2024-06-06-0/+8
| | | Fixes #168 and fixes #169.
* Deprecate DataAttr, StyleAttr, TitleAttr, FormElMarkus Wüstenberg2024-06-06-0/+17
| | | | | | | | | | | | This change addresses #170 by deprecating some HTML helpers in favor of using one of the styles as a main one, selected based on what I think is the main use case. - For `Data`, it's the attribute. I don't see much use of the `<data>` element in the wild. - For `Style`, it's the attribute. The `style` attribute is everywhere, the `<style>` element is perhaps less so (but not much). This was the hardest one to decide. - For `Title`, it's the attribute. The `<title>` element only shows up once per document. - For `Form`, it's the element. I haven't seen much use of the `data` attribute in the wild. I know this is arguably not a "consistent" approach, but I think it makes for a much nicer API, simply because the most-used option will not be a suffixed version.
* add script's integrity and crossorigin attributesJulien Tant2024-06-05-0/+8
|
* Add "checked" bool attributeMarkus Wüstenberg2023-05-11-0/+4
| | | | Fixes #127.
* Add Step attribute (#126)Markus Wüstenberg2023-01-17-0/+4
| | | | | See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#step Fixes #120.
* Add ColSpan and RowSpan attributes (#125)Markus Wüstenberg2023-01-17-0/+8
|
* Add EncType html attribute (#109)Markus Wüstenberg2022-09-29-0/+4
|
* Add loading and srcset HTML attributes (#86)Josep Jesus Bigorra Algaba2021-09-07-0/+8
| | | | | | | Useful for `img` and `picture` elements. Fixes #85. Co-authored-by: Josep Jesus Bigorra Algaba <josep@prowarehouse.nl>
* Add video element and related attributes (#84)Markus Wüstenberg2021-06-18-4/+20
| | | Adds the `video` element and `loop`, `muted`, `playsinline`, `poster` attributes.
* Add LinkStylesheet and LinkPreload components (#79)Markus Wüstenberg2021-06-08-0/+4
| | | These are often used in the `<head>` part of the HTML.
* Add data- attribute helper (#61)Markus Wüstenberg2020-12-22-0/+5
| | | Fixes #49.
* Add aria-* and role attributes (#59)Markus Wüstenberg2020-12-22-0/+9
| | | Fixes #50.
* Simplify available elements (#55)Markus Wüstenberg2020-12-10-0/+16
| | | | | | | `a`, `form`, `img`, `input`, `label`, `option`, `progress`, `select`, and `textarea` are now just regular elements (without helper parameters), because: - Sometimes the use case doesn't fit (`a` as anchor without href, for example) - There's no reason these are special among the others, so streamlining them makes sense Also added new attributes `action`, `alt`, `for`, `method` that I had somehow missed.
* Move elements and attributes into html package (#52)Markus Wüstenberg2020-12-10-0/+161
This makes it easier to use dot-imports. Also updated the readme and examples with new usage, and move the `Classes` helper into the `components` package.