Anchor
A standard hyperlink rendered as a clickable text element.
Basic usage
Section titled “Basic usage”new Anchor("Mateu documentation", "https://mateu.io")Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
text | String | — | Link text |
url | String | — | Target URL (absolute or relative) |
style | String | "" | Inline CSS |
cssClasses | String | "" | CSS class names |
Examples
Section titled “Examples”// External linknew Anchor("Visit our website", "https://example.com")
// Internal navigationnew Anchor("View all orders", "/orders")
// Builder formAnchor.builder() .text("Download PDF") .url("/reports/monthly.pdf") .build()Inside other components
Section titled “Inside other components”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()