Version 0.18.0
🚀 New Features
Added <map>
and <area>
Element Support
Support for the <map>
and <area>
HTML elements has been added, enhancing the capability of creating interactive image maps.
Usage Examples
Create a <map>
element with elem.Map()
and define clickable areas using elem.Area()
:
imageMap := elem.Map(attrs.Props{attrs.Name: "map1"},
elem.Area(attrs.Props{
attrs.Alt: "Area 1",
attrs.Coords: "34,44,270,350",
attrs.Href: "#area1",
attrs.Shape: "rect",
}),
)
This will output:
<map name="map1">
<area alt="Area 1" coords="34,44,270,350" href="#area1" shape="rect">
</map>
Other Changes
- Attributes for
"shape"
,"coords"
, and"usemap"
have been added to the attributes subpackage. - A new constant for "
backdrop-filter"
is now available in the styles package. - Updated the todo example to use
utils.CopyString
for optimized memory management in line with Fiber's performance strategy.