Link

Use to navigate between websites, pages or sections. It’s a navigational element.

Code


                                                        
                                                        
                                                            <PyxisLink
                                                            label="Link"
                                                            route="/home"
                                                            labelled-by="icon"
                                                            data-testid="link"
                                                        />
                                                        
                                                            

Example of a standalone type Link component with an icon

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