Code
<PyxisLink
label="Link"
route="/home"
labelled-by="icon"
data-testid="link"
/>
Props
The Link component supports the following props:
Name |
Type |
Default |
Required |
---|---|---|---|
label |
string |
undefined |
true |
route |
RouteLocationRow |
undefined |
true |
labelledBy |
string |
undefined |
true |
dataTestId |
string |
undefined |
true |
type |
'standalone' | 'list' | 'inline' |
'standalone' |
false |
disabled |
boolean |
false |
false |
iconClass |
string |
undefined |
false |
iconPosition |
'left' | 'right' |
left |
false |
targetBlank |
boolean |
false |
false |
shouldUseRouterLink |
boolean |
true |
false |
Events
The interactions on the Link component are handled by the following Events
- @click : This event is triggered when the Link is clicked