Link
Opens an address or starts an action from text.
When to use
- Link to a related record or an external page.
Examples
Address and action
Loading the example
<k:Stack direction="row" gap="20">
<k:Link text="Documentation" href="https://korui5.abapnews.com" target="_blank"/>
<k:Link text="Show history" icon="clock" press=".onPress"/>
</k:Stack>sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) => Controller.extend("sample.LinkAction", {
onPress(event) {
Toast.show(String("History opened"));
}
}));API
Properties
| Name | Type | Default | Description |
|---|---|---|---|
text | string | Text | |
href | string | Address. Only http, https, mailto, tel and relative addresses are opened | |
target | string | Use _blank to open a new tab | |
icon | string | Leading icon | |
enabled | boolean | true | Whether the control is enabled |
Events
| Name | Type | Description |
|---|---|---|
press | The link was pressed. preventDefault stops navigation |