Link_ex()
Returns an HTML anchor link string with custom class and style attributes. Extended version of Link() for advanced styling.
Syntax
Result.s = MaterialSB::Link_ex(Text.s, *Callback, Class.s = "", Style.s = "")
Parameters
| Text.s | The link text to display. |
| *Callback | Pointer to the procedure to call when clicked. Use #Null for no callback. |
| Class.s | Optional. CSS class names to apply. |
| Style.s | Optional. Inline CSS styles. |
Return Value
Returns an HTML string containing the anchor element.
Example
Procedure OnClick()
MaterialSB::Toast("Link clicked!")
EndProcedure
Procedure Main(Success)
If Success
MaterialSB::Row(MaterialSB::#Grid_Container)
MaterialSB::Col(12)
; Link with custom class
MaterialSB::Append(MaterialSB::Paragraph("Check out " + MaterialSB::Link_ex("this link", @OnClick(), "red-text") + " for more info."))
; Link with inline styles
MaterialSB::Append(MaterialSB::Paragraph("Visit " + MaterialSB::Link_ex("styled link", @OnClick(), "", "font-weight: bold; text-decoration: underline;") + " now."))
; Link with both class and style
MaterialSB::Append(MaterialSB::Paragraph("Click " + MaterialSB::Link_ex("here", @OnClick(), "waves-effect", "padding: 5px 10px; background: #e0e0e0; border-radius: 4px;") + " to continue."))
; Button-style link
MaterialSB::Append(MaterialSB::Link_ex("Large Call to Action", @OnClick(), "btn-large waves-effect waves-light", "margin: 20px 0;"))
MaterialSB::CloseCurrentParent()
MaterialSB::CloseCurrentParent()
EndIf
EndProcedure
MaterialSB::Download(@Main())