Skip to main content

ChevronLink

Library
UDS Base
Repository
github.com/telus/universal-design-system
Package
npmjs.com/package/@telus-uds/ds-allium
Package version
1.14.0
Loading...

Introduction

import { ChevronLink } from '@telus-uds/ds-allium'

A ChevronLink is a navigational link to be used for a single, standalone call to action.

Guidance

Uses of ChevronLink should be limited to:

  1. An action that is performed by navigating to another page or screen
Loading...
  1. A step in a multi-step process performed by navigating to another page or screen
Loading...
  1. With the direction reversed, a "back" step in a multi-step multi-page process
Loading...

Alternatives

Do not use ChevronLink for:

  • Actions that occur immediately on press: consider Button
  • Choices presented as calls to action: consider ButtonLink
  • Actions that occur within the current page or screen: consider TextButton
  • General links that don't represent the logical next action: consider Link

Accessibility

Insert A11yText any time an interactive element's label lacks context that a sighted user would see in the content around it. Many users of assistive technology explore a page by cycling through the interactive elements first.

Loading...

ChevronLink is by default treated as a navigational link by accessibility tools. This may be overridden using accessiblityRole prop; however, in cases where this is appropriate, consider whether ChevronLink is the most appropriate component to use. For example, for step transitions within an app screen, the button role will be more appropriate, but therefore, TextButton may be a more appropriate choice of component.

ChevronLink accepts React Native's accessibility props (web docs, native docs).

Platform considerations

The component is available on both native platforms and web.

On web, ChevronLink will render as an <a> anchor link if a href is provided, allowing for common link actions such as open in new tab.

In native apps, ensure ChevronLink's onPress action utilizes the app navigation history and does not clash with or contradict the behaviour of the device back button or back swipe action, or of any on-screen back button (for example, often shown in the top left corner of a stack screen's header).

Props

NameTypeDefaultDescription
direction'left' | 'right''right'
tokenscustomSystem tokens prop, see tokens for more details

Tokens

In exceptional circumstances, the following tokens can be passed to this component to override its default styles. Do not do this unless absolutely necessary. Read more about overriding styles.

View Tokens
Prop NameToken PropertyToken Type
tokensleftIconicon
rightIconicon
iconDisplacesize
iconSizesize
iconSpaceinteger
textLinetextLine
colorcolor
textLineStyletextLineStyle
outerBorderColorcolor
outerBorderWidthborder
outerBorderGapsize
outerBorderOutlineborderStyle
borderRadiusradius
blockFontNamefontName
blockFontWeightfontWeight
blockFontSizefontSize
blockLineHeightlineHeight
iconicon
iconTranslateXsize
iconTranslateYsize
alignSelfflexAlign

Figma

Variants

ChevronLink's variants are the same as for Link.

Feedback