yarn add @twilio-paste/anchor - or - yarn add @twilio-paste/core
import {Anchor} from '@twilio-paste/core/anchor';
const Component = () => <Anchor href="https://paste.twilio.design">Go to Paste</Anchor>;
href RequiredRequired
A URL to route to.
- Type
string
- Default
null
element
Overrides the default element name to apply unique styles with the Customization Provider
- Type
any
- Default
'ANCHOR'
i18nExternalLinkLabel
Title for showExternal
icon
- Type
string
- Default
'(link takes you to an external page)'
rel
Sets the anchor rel attribute. If external href, defaults to 'noreferrer noopener'. Can be overwritten.
- Type
string
- Default
null
showExternal
Shows the link external icon.
- Type
boolean
tabIndex
Sets the anchor tabIndex attribute.
- Type
AnchorTabIndexes
- Default
null
target
If external href, defaults to '_blank'. Can be overwritten.
- Type
AnchorTargets
- Default
null
variant
Sets the styled Anchor variant
- Type
AnchorVariants
- Default
'default'
Inherited props
Paste components will often extend native HTML elements and as a result will inherit or extend their available properties. Below is a list of the props this component has inherited and are also available to use.