Widgets
Link
Text link widget with optional focus/press behavior and terminal hyperlink support.
Text link widget with optional focus/press behavior and terminal hyperlink support.
Usage
ui.link({ url: "https://rezi.dev/docs", label: "Docs" })
ui.link({
id: "docs-link",
url: "https://rezi.dev/docs",
label: "Documentation",
onPress: () => openDocs(),
})Props
| Prop | Type | Default | Description |
|---|---|---|---|
url | string | required | Target URL for hyperlink-capable terminals |
label | string | url | Display text |
id | string | - | Enables focus and action routing when provided |
disabled | boolean | false | Renders text but disables focus/press |
style | TextStyle | - | Optional style override |
onPress | () => void | - | Local press handler |
key | string | - | Reconciliation key |
Behavior
- Link text defaults to
urlwhenlabelis omitted. - With
idanddisabled !== true, links participate in focus + hit-testing and Enter/Space/click trigger apressaction. - Mouse clicks on link labels route through normal hit-testing now (not just
readInteractiveIdfallback behavior). - On drawlist v1, Rezi emits hyperlink metadata; on older builders it degrades to styled text.