about summary refs log tree commit diff stats
path: root/html/attributes.go
diff options
context:
space:
mode:
authorAmr Ojjeh2024-06-19 03:40:13 -0500
committerGitHub2024-06-19 10:40:13 +0200
commita75b25333d94bef710bbc05a95baa2e77b61bca9 (patch)
treeac85563846cbdb0b70b4742fd9496c9353aa44de /html/attributes.go
parentb950ec2c42bd613fa23625ab6360f58b9ba28e07 (diff)
downloadgomponents-a75b25333d94bef710bbc05a95baa2e77b61bca9.tar.lz
gomponents-a75b25333d94bef710bbc05a95baa2e77b61bca9.tar.zst
gomponents-a75b25333d94bef710bbc05a95baa2e77b61bca9.zip
Add dir (#176)
`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
Diffstat (limited to 'html/attributes.go')
-rw-r--r--html/attributes.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/html/attributes.go b/html/attributes.go
index 728807b..98d70ff 100644
--- a/html/attributes.go
+++ b/html/attributes.go
@@ -270,3 +270,7 @@ func Width(v string) g.Node {
 func EncType(v string) g.Node {
 	return g.Attr("enctype", v)
 }
+
+func Dir(v string) g.Node {
+	return g.Attr("dir", v)
+}