Skip to content

Version 0.14.0

Compare
Choose a tag to compare
@chasefleming chasefleming released this 17 Nov 23:53
· 147 commits to main since this release
c657e09

🚀 New Features

Introduction of DataAttr for Custom Data Attributes

This new function enables the addition of custom data attributes to HTML elements.

Example Usage

Div(attrs.Props{attrs.DataAttr("theme"): "cupcake"}, Text("foobar"))
// <div data-theme="cupcake">foobar</div>

Expanded ARIA Attributes for Accessibility

A comprehensive set of ARIA (Accessible Rich Internet Applications) attributes has been added to the attrs subpackage. For a full list of the new ARIA attributes, see the constants in the attrs subpackage.

Added Various Attributes

Support for step and minlength has been added to our attributes constants.You can access these from the attrs subpackage as attrs.Step and attrs.Minlength.

⚠️ Deprecations

Standardization of Constants in the attrs Package

Several constants have been renamed to adhere to Go's naming conventions.

  • AllowFullScreenAllowFullscreen
  • ReferrerPolicyReferrerpolicy
  • NoValidateNovalidate
  • MaxLengthMaxlength
  • DateTimeDatetime
  • CrossOriginCrossorigin
  • SrcDocSrcdoc
  • IsMapIsmap

Users are advised to update their code to the new standards. The deprecated constants will remain available for a transition period, but will be removed in future releases.

🙏 Thanks to Contributors