Hyperlink
minimal usage
with blank target
blank target without Icon
with onClick
with icon
color variants
link variants
- destination
stringRequired Requiredspecifies the URL
- children
nodeRequired RequiredContent of the hyperlink
- className
stringRequiredCustom class names for the hyperlink
- target
stringRequiredDefault'_self'specifies where the link should open. The default behavior is
_self, which means that the URL will be loaded into the same browsing context as the current one. If the target is_blank(opening a new window)rel='noopener'will be added to the anchor tag to prevent any potential reverse tabnabbing attack. - onClick
funcRequiredDefault() => {}specifies the callback function when the link is clicked
- externalLinkAlternativeText
isRequiredIf( PropTypes.string, props => props.target === '_blank', )RequiredDefault'in a new tab'specifies the text for links with a
_blanktarget (which loads the URL in a new browsing context). - externalLinkTitle
isRequiredIf( PropTypes.string, props => props.target === '_blank', )RequiredDefault'Opens in a new tab'specifies the title for links with a
_blanktarget (which loads the URL in a new browsing context). - variant
enumRequired'default' | 'muted' | 'brand'Default'default'type of hyperlink
- isInline
boolRequiredDefaultfalsespecify the link style. By default it will be underlined.
- showLaunchIcon
boolRequiredDefaulttruespecify if we need to show launch Icon. By default it will be visible.