Skip to content

Anchor

A standard hyperlink rendered as a clickable text element.

new Anchor("Mateu documentation", "https://mateu.io")
PropertyTypeDefaultDescription
textStringLink text
urlStringTarget URL (absolute or relative)
styleString""Inline CSS
cssClassesString""CSS class names
// External link
new Anchor("Visit our website", "https://example.com")
// Internal navigation
new Anchor("View all orders", "/orders")
// Builder form
Anchor.builder()
.text("Download PDF")
.url("/reports/monthly.pdf")
.build()
VerticalLayout.builder()
.spacing(true)
.content(List.of(
new Text("Need help?"),
new Anchor("Read the documentation", "https://mateu.io/docs"),
new Anchor("Contact support", "mailto:support@example.com")
))
.build()