Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( TagOpen = []byte("<legend") TagClose = []byte("</legend>") )
Byte constants for HTML rendering.
Functions ¶
func New ¶
New Creates a new legend element with optional child nodes. Example: legend.New() Renders: <legend></legend>
func RawText ¶
func RawText(str string) *element
RawText Creates a new legend element with raw text content. Uses text.RawText which is not HTML-escaped. Example: legend.RawText("<span class=\"required\">*</span> Personal Information") Renders: <legend><span class="required">*</span> Personal Information</legend>
func RawTextf ¶
RawTextf Creates a new legend element with formatted raw text content. Uses text.RawTextf which is not HTML-escaped. Example: legend.RawTextf("<span class=\"step\">%d</span> %s", step, "Details") Renders: <legend><span class="step">1</span> Details</legend>
func Static ¶
func Static(str string) *element
Static Creates a new legend element with static text content. Uses text.Static which is not HTML-escaped and is JIT-optimisable. Example: legend.Static("Account Settings") Renders: <legend>Account Settings</legend>