Hyperlink
minimal usage
with blank target
blank target without Icon
with onClick
with icon
color variants
link variants
- destination
string
Required Requiredspecifies the URL
- children
node
Required RequiredContent of the hyperlink
- className
string
RequiredCustom class names for the hyperlink
- target
string
RequiredDefault'_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
func
RequiredDefault() => {}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
_blank
target (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
_blank
target (which loads the URL in a new browsing context). - variant
enum
Required'default' | 'muted' | 'brand'Default'default'type of hyperlink
- isInline
bool
RequiredDefaultfalsespecify the link style. By default it will be underlined.
- showLaunchIcon
bool
RequiredDefaulttruespecify if we need to show launch Icon. By default it will be visible.