Skip to contentSkip to navigationSkip to topbar
Paste assistant Assistant
Figma
Star

Anchor

Version 12.1.0GithubStorybook

An Anchor is text that navigates the user from one webpage to another.

Installation

Installation page anchor
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>;

Anchor

Anchor page 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'